diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 6f212c14..b7f83f0b 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -3,8 +3,9 @@ namespace App\Exceptions; use Exception; +use Illuminate\Support\Facades\Route; use Illuminate\Auth\AuthenticationException; -use Symfony\Component\Debug\Exception\FlattenException; +use Illuminate\Session\TokenMismatchException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; class Handler extends ExceptionHandler @@ -45,6 +46,10 @@ class Handler extends ExceptionHandler */ public function render($request, Exception $exception) { + if ($exception instanceof TokenMismatchException) { + Route::getRoutes()->match($request); + } + return parent::render($request, $exception); }