resource controller routes in laravel 8 code example
Example 1: how to named route resource laravel
Route::resource('faq', 'ProductFaqController', [
'names' => [
'index' => 'faq',
'store' => 'faq.new',
// etc...
]
]);
Example 2: resource controller laravel
Route::resource('photos', PhotoController::class);