Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how change resource route parameters lravel

By default, Route::resource will create the route parameters
for your resource routes based on the "singularized" version
of the resource name. You can easily override this on a per resource 
basis using the parameters method. The array passed into the parameters
method should be an associative array of resource names and parameter names:

use AppHttpControllersAdminUserController;

Route::resource('users', AdminUserController::class)->parameters([
    'users' => 'admin_user'
]);
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #change #resource #route #parameters #lravel
ADD COMMENT
Topic
Name
8+6 =