In new laravel I can\'t get session in constructor. Why?
public function __construct() { dd(Session::all()); //this is empty array }
a
As of Laravel 6.18.1, add these to $middleware array in the kernel.php
$middleware
\Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class,
And it should work.