Laravel 5.3 cookies are not created in the browser

I ran into the problem of token mismatch on the new server, working fine in localhost. I tried my best to clear the cache and give SESSION_DOMAIN a path in env, but everything seems useless.

Also, session cookies are not created in the web browser when they are created in the storage / framework / session folder.

Please help me!

+4
source share
2 answers

Are you getting an exception tokenMismatchException?

If so, some of the possible reasons are:

  • Check your files for the PHP end tag "?>", If it exists, delete it. See the link for more details .

  • , web. . ( laravel 5.2, ).

+1

, - web. /web.php

Route::group(['middleware' => ['web']], function () {
    <routes>
});

https://laravel.com/docs/5.3/upgrade, , - , .

, , , , .

0

Source: https://habr.com/ru/post/1686768/


All Articles