RedirectIfAuthenticated

Kennith Leung
Aug 8, 2017 · 1 min read

#noteToSelf

In Laravel LoginController, the middleware guest is injected.

The middleware guestis a RedirectIfAuthenticated class. This class, from out of the box, redirect authenticated user to the home route.

You can change to any route you wish in /app/Http/Middleware/RedirectIfAuthenticated.php

    Kennith Leung

    Written by

    Husband, father, basketball player, and I build stuff on the Internet.

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade