Laravel Token Mismatch Error in AJAX Check session storage path & permission

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Here I assume that project app url is APP_URL=http://project.dev/ts/toys-store

  1. Set the writable permission to storage_path('framework/sessions') the folder.
  2. Check the path of your laravel project 'path' => '/ts/toys-store', the root of your laravel project.
  3. Change the name of your cookie 'cookie' => 'toys-store',
return [
    'driver' => env('SESSION_DRIVER', 'file'),
    'lifetime' => 120,
    'expire_on_close' => false,
    'encrypt' => false,
    'files' => storage_path('framework/sessions'),
    'connection' => null,
    'table' => 'sessions',
    'lottery' => [2, 100],
    'cookie' => 'toys-store',
    'path' => '/ts/toys-store',
    'domain' => null,
    'secure' => false,
    'http_only' => true,
];


Got any Laravel Question?