Support the ongoing development of →
Configuration Session Laravel
Last updated 2 years ago.

Solved by adding \Illuminate\Session\Middleware\StartSession::class,

In Kernel.php

Before 'api' => [ 'throttle:60,1', 'bindings', ],

After 'api' => [ \Illuminate\Session\Middleware\StartSession::class, 'throttle:60,1', 'bindings', ],


Its great you were able to solve it but I would not call that the proper solution as an API in itself is stateless which means it has no session

the way we keep track of a session using an API is usually by means of a token one way of doing that with laravel would by by using the standard API authentication driver or if you want to be able to use Oauth2 then use Laravel Passport

These are only suggestion

Best of luck with your Site


Sign in to participate in this thread!


Your banner here too?


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

Your logo here?

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

© 2024 - All rights reserved.