APP_INSTALLED should be checked in order to decide that app is installed or not

This commit is contained in:
Sevan Nerse 2019-11-17 10:54:30 +03:00
parent b4eb9337d9
commit ea92c9674e

View File

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