DEV Community

Cover image for How to Fix Session store not set on request Laravel 11?
Abdul Wahid Kahar
Abdul Wahid Kahar

Posted on

How to Fix Session store not set on request Laravel 11?

Add the following code in the bootstrap/app.php file:



use Illuminate\Session\Middleware\StartSession;
$middleware->append(StartSession::class);


Enter fullscreen mode Exit fullscreen mode

Image description

This is because the way we register custom middleware has changed slightly compared to Laravel 10 and earlier versions.

Hope this helps, thank you!

Top comments (1)

Collapse
 
marshal_nzenza_cd36b3e859 profile image
Marshal Nzenza

This saved my life, thanks so much.