Add the following code in the bootstrap/app.php file:
use Illuminate\Session\Middleware\StartSession; $middleware->append(StartSession::class);
This is because the way we register custom middleware has changed slightly compared to Laravel 10 and earlier versions.
Hope this helps, thank you!
The above is the detailed content of How to Fix Session store not set on request Laravel. For more information, please follow other related articles on the PHP Chinese website!