blessing-skin-server/app/Http/Middleware/CheckInstallation.php
2019-04-09 13:21:31 +08:00

22 lines
445 B
PHP

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