Created
July 27, 2016 10:41
-
-
Save justinobb/b6439ccaa215f733c04ac0989070d651 to your computer and use it in GitHub Desktop.
Laravel 5.2, Laravel 5.3 Session Regenerating New ID on each request, Session ID keeps changing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From your friends at _Origin Broadband_ | |
Since this hasn't been outlined anywhere online yet, a change was made to an environmental change which can | |
cause the session to constantly be regenerated. | |
The file in question is app/Providers/RouteServiceProvider.php | |
You will notice your defaults are: | |
protected function mapWebRoutes(Router $router) | |
{ | |
$router->group([ | |
'namespace' => $this->namespace, 'middleware' => 'web', | |
], function ($router) { | |
require app_path('Http/routes.php'); | |
}); | |
} | |
This automatically adds the "web" middleware to your routes. If you're experiencing this problem in your app, | |
check your routes.php file. | |
Remove any references such as 'middleware' => 'web' or 'middleware' => ['web'] as the web middleware is already running. | |
Reload your project and remember to clear your cached routes if necessary using "php artisan route:clear" or regenerate them with | |
"php artisan route:cache" | |
From your friends at _Origin Broadband_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment