Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how naming resource routes laravel

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'
]);
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #naming #resource #routes #laravel
ADD COMMENT
Topic
Name
2+7 =