In new laravel I can\'t get session in constructor. Why?
public function __construct() { dd(Session::all()); //this is empty array }
a
I used Session in the construct using middleware, You can try, It would be helpful
public function __construct() { $this->middleware('PM'); $this->middleware(function ($request, $next){ $school_id = Session::get('school_id'); return $next($request); }); }