diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 215d23b7..13d3e65f 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -3,6 +3,7 @@ namespace App\Exceptions; use Exception; +use App\Http\Middleware\Internationalization; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Foundation\Validation\ValidationException; use Symfony\Component\HttpKernel\Exception\HttpException; @@ -55,6 +56,11 @@ class Handler extends ExceptionHandler exit; } + if ($e instanceof HttpException) { + // call i18n middleware manually since http exceptions won't be sent through it + (new Internationalization)->handle($request, function(){}); + } + if ($e instanceof ValidationException) { return $e->getResponse()->setStatusCode(200); }