Laravel new console command

1. Create

php artisan make:command MyApp --command=myapp:perform

2. Edit

vi app/Console/Commands/MyApp.php
....
    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        echo 'My App';
    }

3. Run

php artisan myapp:perform

Leave a Reply