Laravel new console command
Posted on February 2, 2018, 3:58 pm, by admin, under
laravel.
1. Create
php artisan make:command MyApp --command=myapp:perform |
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';
} |
vi app/Console/Commands/MyApp.php
....
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
echo 'My App';
}
3. Run
php artisan myapp:perform |
php artisan myapp:perform