[英]Laravel route not defined error when route is defined
In my view I am calling the following function: 在我看来,我正在调用以下函数:
<a href="{!! Route('admin.sessions') !!}">Sessions</a>
Which is triggering the following error: 触发以下错误:
ErrorException in UrlGenerator.php line 307:
Route [admin.sessions] not defined.
The thing is in my routes I have the following: 事情在我的路线上,我有以下几点:
Route::get('admin/sessions', ['middleware' => ['ability:super_admin,sessions.view'], 'uses' => 'Admin\SessionsController@index', 'as' => 'admin.sessions']);
Am I missing something? 我想念什么吗? This should work shouldn't it?
这应该工作吗?
发现问题,我有另一条路由引用了相同的URL,但使用了不同的名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.