From 4d5e240602d268b25201ec01b41fc21f32585b5c Mon Sep 17 00:00:00 2001 From: Vasyka Date: Thu, 7 May 2026 05:06:25 +0000 Subject: [PATCH] fix: / redirects to /app (tenant) or /admin (central) --- routes/web.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 6847bbe..b194127 100644 --- a/routes/web.php +++ b/routes/web.php @@ -5,7 +5,12 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; Route::get('/', function () { - return view('welcome'); + // On a tenant subdomain → redirect to the tenant panel. + if (app(TenantManager::class)->isResolved()) { + return redirect('/app'); + } + // On the central domain → redirect to admin. + return redirect('/admin'); }); // PWA — manifest dinamic per tenant.