Member-only story
Laravel Modules — Artisan Commands
You can use the following commands with the --help
suffix to find its arguments and options.
Note all the following commands use “Blog” as an example module name, and example class/file names
Utility commands
module:make
Generate a new module.
php artisan module:make Blog
module:make
Generate multiple modules at once.
php artisan module:make Blog User Auth
module:use
Use a given module. This allows you to not specific the module name on other commands requiring the module name as an argument.
php artisan module:use Blog
module:list
List all available modules.
php artisan module:list
module:migrate
Migrate the given module, or without a module an argument, migrate all modules.
php artisan module:migrate Blog
module:migrate-rollback
Rollback the given module, or without an argument, rollback all modules.
php artisan module:migrate-rollback Blog