From ea92c9674e6c3df29688a402086ee058c7fda019 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Sun, 17 Nov 2019 10:54:30 +0300 Subject: [PATCH] APP_INSTALLED should be checked in order to decide that app is installed or not --- app/Http/Middleware/RedirectIfNotInstalled.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Http/Middleware/RedirectIfNotInstalled.php b/app/Http/Middleware/RedirectIfNotInstalled.php index c44af5a2a..844a0ad8f 100644 --- a/app/Http/Middleware/RedirectIfNotInstalled.php +++ b/app/Http/Middleware/RedirectIfNotInstalled.php @@ -3,7 +3,6 @@ namespace App\Http\Middleware; use Closure; -use File; use Illuminate\Support\Str; class RedirectIfNotInstalled @@ -17,12 +16,12 @@ class RedirectIfNotInstalled */ public function handle($request, Closure $next) { - // Check if .env file exists - if (File::exists(base_path('.env'))) { + // Check application is installed or not + if (env('APP_INSTALLED', false) == true) { return $next($request); } - // Already in the wizard + // Already in the installation wizard if (Str::startsWith($request->getPathInfo(), '/install')) { return $next($request); }