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); }