2017-07-06 15 views
0

まずlaravelにカスタムディレクトリ内のユーザモデルを移動した後、私はフォルダApp/Models/Frontend内部ユーザモデルを動かしました。その後:TokenMismatchException 5.4

  • 私はnamespace App\Models\Frontend

  • にユーザモデルの名前空間を更新した後、更新config/auth

    に 'プロバイダ' => [ 'ユーザー' => [ 'ドライバー' => '雄弁'、 'モデル' =>アプリケーション\モデル\フロントエンド\ユーザー::クラス、 ]、

また、私はすでにphp artisan config:cachephp artisan cache:clearを試していました。私はcomposer.jsonファイルを変更していませんが、まだcomposer autoloadで運が試行されますが、表示されません。

エラー:

(1/1) TokenMismatchException 
in VerifyCsrfToken.php (line 68) 
at VerifyCsrfToken->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in ShareErrorsFromSession.php (line 49) 
at ShareErrorsFromSession->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in StartSession.php (line 64) 
at StartSession->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in AddQueuedCookiesToResponse.php (line 37) 
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in EncryptCookies.php (line 59) 
at EncryptCookies->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in Pipeline.php (line 102) 
at Pipeline->then(object(Closure)) 
in Router.php (line 576) 
at Router->runRouteWithinStack(object(Route), object(Request)) 
in Router.php (line 535) 
at Router->dispatchToRoute(object(Request)) 
in Router.php (line 513) 
at Router->dispatch(object(Request)) 
in Kernel.php (line 176) 
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) 
in Pipeline.php (line 30) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in TransformsRequest.php (line 30) 
at TransformsRequest->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in TransformsRequest.php (line 30) 
at TransformsRequest->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in ValidatePostSize.php (line 27) 
at ValidatePostSize->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in CheckForMaintenanceMode.php (line 46) 
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) 
in Pipeline.php (line 148) 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) 
in Pipeline.php (line 53) 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) 
in Pipeline.php (line 102) 
at Pipeline->then(object(Closure)) 
in Kernel.php (line 151) 
at Kernel->sendRequestThroughRouter(object(Request)) 
in Kernel.php (line 116) 
at Kernel->handle(object(Request)) 
in index.php (line 53) 
at require_once('C:\\wamp64\\www\\birthday_notifier\\public\\index.php') 
in server.php (line 21) 

任意の提案はかなりのだろう。

+0

に加えて、あまりにも、次のファイルを更新する必要があります'名前空間App \ Http \ Models \ Frontend'でなければなりません。 – Robert

答えて

0

最終的に答えが見つかりました。あなたも同様の状況にある場合。あなたは `アプリ/ HTTP /モデル/ Frontend`、あなたの名前空間にUserモデルを移動した場合、あなたはconfig/auth.php

  • app/Http/Controllers/RegisterController.php
  • config/services.php
  • database/factories/ModelFactory.php
関連する問題