comment creer controller avec index creat show code example
Example 1: use resource in laravel 8
php artisan make:controller PhotoController --resource --model=Photo
Example 2: Route::resource
Route::resource('photos', PhotoController::class)->only([
'index', 'show'
]);
Route::resource('photos', PhotoController::class)->except([
'create', 'store', 'update', 'destroy'
]);