Support the ongoing development of Laravel.io →
Authentication Session
Last updated 2 years ago.
0
Solution

you need the 'web' middleware applied to all routes where you need sessions, which auth uses.

0

So are you saying that I should rewrite my routes group like this:

Route::group(array('prefix' => 'admin', 'namespace' => 'Admin', 'middleware' => ['web', 'auth']), function(){
	Route::get('users', 'UsersController@index');
});

or maybe I could define a new middleware that consists of those two - web and auth?

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

norbert25 norbert25 Joined 26 Jan 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.