Laravel 5.5 login and register page says:The page has expired due to inactivity.[TokenMismatchException]

后端 未结 17 3195
你的背包
你的背包 2020-12-09 05:11

I just created a new project of laravel version 5.5 with the laravel installer.And run the command \"php artisan make:auth\".The views and controller are generated

17条回答
  •  佛祖请我去吃肉
    2020-12-09 06:15

    Hi for the group paths that you want to apply to everyone, use this method, which is my 5.5 larval version. Use the star => go to app/Http/Middleware/VerifyCsrfToken and add

    protected $except = [
        '/user/*'
    ];
    

    This is also my user's path

    Route::group(['prefix' => 'user', 'namespace' => 'User', 'as' => 'user.'] , function (){
    

提交回复
热议问题