Merge pull request #905 from SevanNerse/master

APP_INSTALLED should be checked in order to decide that app is instal…
This commit is contained in:
Denis Duliçi 2019-11-17 12:15:31 +03:00 committed by GitHub
commit 272905decc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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