diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index c580e7b3feae..3ab3c69eb143 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -18,6 +18,7 @@ use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\AuthenticationException; use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundException; use Illuminate\Database\Eloquent\RelationNotFoundException; +use Illuminate\Encryption\MissingAppKeyException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Http\Exceptions\ThrottleRequestsException; use Illuminate\Http\Request; @@ -149,6 +150,10 @@ class Handler extends ExceptionHandler } parent::report($exception); + + if (Ninja::isSelfHost() && $exception instanceof MissingAppKeyException) { + \Log::error('To setup the app run "cp .env.example .env" followed by "php artisan key:generate"'); + } } private function validException($exception) diff --git a/resources/views/portal/ninja2020/layout/error.blade.php b/resources/views/portal/ninja2020/layout/error.blade.php index b04dacd5bb5b..b42e706d78f0 100644 --- a/resources/views/portal/ninja2020/layout/error.blade.php +++ b/resources/views/portal/ninja2020/layout/error.blade.php @@ -10,11 +10,17 @@