Route::resource('faq', 'ProductFaqController', [
'names' => [
'index' => 'faq',
'store' => 'faq.new',
// etc...
]
]);
By default, all resource controller actions have a route name;
however, you can override these names by passing a names array
with your desired route names:
use AppHttpControllersPhotoController;
Route::resource('photos', PhotoController::class)->names([
'create' => 'photos.build'
]);
Route::resource('product',
AppHttpControllersAPIAdminProductController::class, [
'names' => [
'index' => 'admin.product.index',
'store' => 'admin.product.store',
'update' => 'admin.product.update',
'destroy' => 'admin.product.delete'
]
])->except(['edit', 'create']);