我不知道我在这里做错了什么,每当我输入URL:
这是我的路由:
localhost/project/public/auth/login
时,它会将我重定向到localhost/project/public/home
,因此我会收到错误:NotFoundHttpException
。这是我的路由:
// Authentication routes...
Route::get('/auth/login', 'Auth\AuthController@getLogin');
Route::post('/auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');
// Registration routes...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');
Route::controllers([
'password' => 'Auth\PasswordController',
]);
我已经在authController中添加了这些内容:
protected $redirectPath = "/adminportfolio";
protected $loginPath = 'auth/login';
protected $redirectAfterLogout = '/index';
Please can someone help me out here..
/adminportfolio
页面。请尝试从$redirectPath
中删除前导斜杠/
。 - BrokenBinary