php artisan controller command code example
Example 1: laravel create controller command
php artisan make:controller UserController
Example 2: use php artisan command through controller
<?php
Route::get('/foo', function () {
Artisan::queue('email:send', [
'user' => 1, '--queue' => 'default'
]);
//
});