<?php
 namespace App\Http\Middleware; use App\Services\Install\InstallService; use Closure; use Illuminate\Http\Request; class RedirectIfInstalled { public function __construct(private readonly InstallService $install) { } public function handle(Request $request, Closure $next) { if ($this->install->isInstalled()) { return redirect()->route('admin.login'); } return $next($request); } } 