laravel resourceful controller code example
Example 1: Route::resource
Route::resource('photos', PhotoController::class)->only([
'index', 'show'
]);
Route::resource('photos', PhotoController::class)->except([
'create', 'store', 'update', 'destroy'
]);
Example 2: resource controller laravel
Route::resource('photos', PhotoController::class);
Example 3: controller in laravel 8
Rout::get('/test' , [TestController::class , 'index']);