需要问有关错误,当我试图重定向我注销Laravel 5.1路由重定向
这是UserController中:
public function logout()
{
Auth::logout();
return redirect()->route('auth/login');
}
这是我的路线:
Route::get('/', function() {
return view('welcome');
});
// Authentication routes...
Route::get('auth/login', 'Auth\[email protected]');
Route::post('auth/login', 'Auth\[email protected]');
Route::get('auth/logout', 'Auth\[email protected]');
// Registration routes...
Route::get('auth/register', 'Auth\[email protected]');
Route::post('auth/register', 'Auth\[email protected]');
Route::get('testing', '[email protected]');
Route::get('logout', '[email protected]');
我认为,在路线上一切正常,并且我已正确定义登录(如Laravel文档)
但它仍然会出现此错误:
InvalidArgumentException in UrlGenerator.php line 306:
Route [auth/login] not defined.
你可以请问什么是错的?我犯了什么错误吗?
非常感谢,祝你有个愉快的一天!
谢谢,现在工作对我来说:) – Mario