laravel 5重定向到前一页登录后。laravel 5重定向到后签收前一页
当我手动打一个网址,如果它不是在其redrecting登录到登录页面,但登录后应该重定向到输入的网址,但在我的情况下,它将进入主页。
代码:
public function index()
{
// Is the user logged in?
if (Auth::check())
{
return Redirect::route('dashboard');
}
// Show the page
return View('auth.login');
}
public function getSignin()
{
// Is the user logged in?
if (Auth::check())
{
return Redirect::route('dashboard');
}
// Show the page
return View('auth.login');
}
或者我应该改变中间件? – user6527
[Laravel可能重复登录后重定向回原始目的地](http://stackoverflow.com/questions/15389833/laravel-redirect-back-to-original-destination-after-login) – jannej