Session does not display correctly in Laravel 10 after AJAX request
<p>I am developing a web application using Laravel framework. I'm using the Laravel session system in part of my application and configured it to store sessions in a database. </p>
<p>My problem is that the session set in one of the routes in the application does not display correctly in other pages and instead returns a null value. I should mention that this problem only occurs when I send a request to the server via AJAX and update the session. </p>
<p>I have checked all session configuration settings as well as php.ini and .env settings, but the problem persists. Do you have any ideas to solve this problem? </p>
<p>https://gist.github.com/realrezamirzaei/3fd51d57a95f90bacd3cc4aec06ba923</p>
<p>"I'm trying to configure Laravel sessions to store sessions in the database, and I've checked the session settings in the php.ini and .env files. However, the session set in one of the routes in my application doesn't The display displays correctly in other pages, but a null value is returned. I want the session to display correctly on all pages."</p>