我正在使用Laravel5和Sentinel,并在sentinel.php配置文件中禁用了默认路由:
'routes_enabled => false'
我使用的是"rydurham/sentinel": "~2.2" composer包。
现在,我正在尝试创建自己的路由,以便身份验证系统遵循。我设法让我自己的自定义登录页面正确显示使用以下代码:
Route::get('login', ['as' => 'sentinel.login', function()
{
return View::make('Auth.login');
}]);然而,当登录表单发布时,我在尝试让路由正常工作时遇到了问题。这是我的路线:
Route::post('login', ['as' => 'sentinel.session.store', 'uses' => 'Sentinel\Controllers\SessionController@store', function()
{
}]);我得到以下错误:
ReflectionException in Container.php line 736: Class App\Http\Controllers\Sentinel\Controllers\SessionController does not exist发布于 2015-08-03 01:55:07
我设法修复了它,在到Sentinel Controller的路由路径中添加了一个\:
Route::post('login', ['as' => 'sentinel.session.store', 'uses' => '\Sentinel\Controllers\SessionController@store', function()
{
}]);https://stackoverflow.com/questions/31773133
复制相似问题