diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php index 7771bef479d2..bc16d510ac75 100644 --- a/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/src/Illuminate/Foundation/Exceptions/Handler.php @@ -383,10 +383,13 @@ protected function renderHttpException(HttpException $e) { $status = $e->getStatusCode(); - view()->replaceNamespace('errors', [ - resource_path('views/errors'), - __DIR__.'/views', - ]); + view()->replaceNamespace('errors', + collect(config('view.paths')) + ->map(function ($path) { + return "{$path}/errors"; + }) + ->push(__DIR__.'/views')->all() + ); if (view()->exists($view = "errors::{$status}")) { return response()->view($view, ['exception' => $e], $status, $e->getHeaders());