laravel 8 route for resource controller code example
Example 1: how to named route resource laravel
Route::resource('faq', 'ProductFaqController', [
'names' => [
'index' => 'faq',
'store' => 'faq.new',
// etc...
]
]);
Example 2: use resource in laravel 8
php artisan make:controller PhotoController --resource --model=Photo