blessing-skin-server/app/Http/Middleware/CheckInstallation.php
Pig Fang e0a8d4cb3e Fix
2019-03-18 17:57:20 +08:00

22 lines
416 B
PHP

<?php
namespace App\Http\Middleware;
use App\Http\Controllers\SetupController;
class CheckInstallation
{
public function handle($request, \Closure $next)
{
if (env('DB_CONNECTION') == 'dummy') {
return $next($request);
}
if (SetupController::checkTablesExist()) {
return response()->view('setup.locked');
}
return $next($request);
}
}