laravel name route resource 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
Example 3: Laravel 8 Resource
php artisan make:controller BlogController --resource