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!
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3