You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you install this template then you can get this errors
Unknown named parameter $note
... Unknown named parameter $user
From official documentation:
By default, Route::resource will create the route parameters for your resource routes based on the "singularized" version of the resource name.
So for routes that generates using resource there should be methods in controllers with appropriate param names. But in current controllers this param names like $id and not like singularized version. So we should change routes or controller param names. the easy way to fix route files like this:
If you install this template then you can get this errors
Unknown named parameter $note
...
Unknown named parameter $user
From official documentation:
So for routes that generates using resource there should be methods in controllers with appropriate param names. But in current controllers this param names like $id and not like singularized version. So we should change routes or controller param names. the easy way to fix route files like this:
Route::resource('notes', 'NotesController')->parameters([ 'notes' => 'id']);
...
Route::resource('users', 'UsersController')->except( ['create', 'store'] )->parameters([ 'users' => 'id']);
and etc.
The text was updated successfully, but these errors were encountered: