jeudi 1 décembre 2016

laravel 5 redirect to previous page after sign in

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');
    }



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2gLqbbV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire