laravel method in controller code example
Example 1: laravel create controller
php artisan make:controller MyController
Example 2: resource controller laravel
Route::resource('photos', PhotoController::class);
php artisan make:controller MyController
Route::resource('photos', PhotoController::class);