-
Notifications
You must be signed in to change notification settings - Fork 32
Registering Commands
Denis Duliçi edited this page Nov 19, 2019
·
2 revisions
Your module may contain console commands. You can generate these commands manually, or with the following helper:
php artisan module:make-command CreatePostCommand my-blogThis will create a CreatePostCommand file/class under the Blog module. By default, it will be Modules/MyBlog/Console/CreatePostCommand
Check out the Laravel documentation about Artisan commands.
You can register the command using the Laravel method called commands that is available inside a service provider class.
$this->commands(\Modules\MyBlog\Console\CreatePostCommand::class);You can now access your command via php artisan in the console.