make laravel controller php 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'
]);
//
});
Example 3: resource controller laravel
Route::resource('photos', PhotoController::class);