Authenticated / Not Authenticated Redirection

-1

When we protect a route by login and try to access this route without being logged in, laravel sends us to the login screen. Dai if you authenticate it, it sends to that route that you tried to access without being logged in.

I'm having a problem because I do not want laravel to keep this login and redirect attempt. Would you like to know how to handle this?

    
asked by anonymous 24.12.2018 / 02:47

1 answer

1

The laravel treats it in several ways. The recurring way is to use trait: Illuminate\Foundation\Auth\AuthenticatesUsers if you are using the default authentication provided by the framework: php artisan make:auth . Laravel generated the login driver: App\Http\Controllers\Auth\LoginController There exists the protected $redirectTo = '/rotapararedirecionaraposologin' property

    
24.12.2018 / 03:06