Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Tallyson's avatar

Session Issues

Hi guys, how are you? I'm using Laravel 5.3 version. I have one "View" in the folder auth/login.blade.php and my login form point to the route "/login" using for this, one laravel class. I say this, because in my Laravel installation, I'm using Laravel native login system. This is the route: post('login', 'Auth\LoginController@login'); Then, the web.php routes configuration file it is like this: Auth::routes(); In login form: {!! Form::open(['url' => '/login', 'method' => 'post']) !!} in my routes: Route::get('/', ['middleware' => 'auth', 'as' => 'home', 'uses' => 'Index@index']); I put my in my LoginController to redirect to Main Directory "/", and when the user isn't be authenticated, the system must be redirect to login view. When I acces the protected view, I'm redirected to login view. Great! When I login, i'm redirected to the login view again. I have tested: The login process is working. I make a test using : Route::get('/', ['middleware' => 'auth.basic', 'as' => 'home', 'uses' => 'Index@index']); And... take a guess, Work fine! The problem is in my session construction maybe, I don't know... Some light (lol)?

0 likes
2 replies
Jaytee's avatar

Just wondering do you have a registered user? If so, how did you register the user?

Tallyson's avatar

Yes, I have user registration. Registration is done via a form that came with the installation of Laravel

Please or to participate in this conversation.