laravel 5 redirect to previous page after sign in.
When I am hitting a url manually if its not logged in its redrecting to login page but after login it should redirect to url which entered but in my case its going to home page.
Code:
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');
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire