我有点搞不清楚这是怎么回事.但我有Route [/preferences/1] not defined
个错误.
在我的路由上.我有:
Route::patch('/preferences/{id}', 'UserController@update');
个
在视图文件(account/preferences.blade.php)中,我有:
{!! Form::model(Auth::user(), ['method' => 'PATCH', 'route' => '/preferences/' . Auth::user()->id]) !!}
我得到一个错误,告诉我路由不存在.我想我误解了关于这个主题的文档,但在我看来,我已经用给定的参数为补丁请求定义了一个路由,并在视图中正确设置了它.
我在这里忽略了什么?