dimanche 13 mars 2016

Change name of route:resource parameter

I have this route:

Route::group(['middleware' => 'admin'], function () {
Route::resource('backoffice/home', 'Backoffice\Home');
Route::resource('backoffice/ProductBasic', 'Backoffice\ProductBasic');
});

Laravel by default uses "ProductBasic" as parameter. As can be requested with

Request::route()->parameters();

The return on dd() will be

array:1 [▼
"ProductBasic" => "1"
]

I would like to adjust of every var. How can i do that while still using Route::resource as a method of creating my routes.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire