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