Skip to content
On this page

CLI Commands

CLI Commands in the CMS makes easy to genarate and scafold the module specific folders and files.

make:trait

php artisan make:trait TraitName

This command will generate the trait file in the (app/Traits) directory.

make:service

php artisan make:service ServiceName

This command will generate the service file in the (app/Services) directory.

make:transformer

php artisan make:transformer TransformerName

This command will generate the controller file in the (app/Transformers) directory.

make:indexblade

php artisan make:indexblade filename

This command will generate the blade file in the (resources/views) directory.

Likewise, these all commands also supports the sub-folder structure. So in order to create the file in the specific folder we can execute like:

php artisan make:service system\users\UserService

This command will create the UserService file under app/Services/system/users. If file already exists error is thrown.