-
-
Notifications
You must be signed in to change notification settings - Fork 93
Command
Asep edited this page Feb 18, 2023
·
2 revisions
Let's create our first command by running code below
php artisan module:make-command BlogCommand --module=Blog
If it was created successfully then a new command's file will be saved as Modules/Blog/Console/Commands/BlogCommand.php
, to call this command, you must add this command to service provider. Please open \Modules\Blog\Providers\BlogServiceProvider
and follow the example below.
. . .
use Models\Blog\Console\Commands\BlogCommand;
. . .
/**
* Register list of command
*
* @return void
*/
protected function registerCommand()
{
if ($this->app->runningInConsole()) {
$this->commands([
BlogCommand::class
]);
}
}
. . .
If it was registered, then you can call with artisan
- #1 Create Module
- #2 Create Menu
- #3 Route
- #4 Create DataTables
- #5 Template Layout
- #6 Create Model
- #7 Create Command
- #8 Create Component
- #9 Broadcast Notification
- #10 Group Search
- #11 Flashing Message
- #12 Compiling Assets (ViteJs)
- #13 Ladmin Option
- #14 Utility & Helpers
- #15 Vendor Publish
- #16 Custom Style
- #17 Ladmin Awesome
- #18 Make Money