TDoG-Skin/app/Http/Middleware/CheckInstallation.php

19 lines
376 B
PHP
Raw Permalink Normal View History

2024-08-17 18:43:48 +08:00
<?php
namespace App\Http\Middleware;
use Illuminate\Filesystem\Filesystem;
class CheckInstallation
{
public function handle($request, \Closure $next)
{
$hasLock = resolve(Filesystem::class)->exists(storage_path('install.lock'));
if ($hasLock) {
return response()->view('setup.locked');
}
return $next($request);
}
}