fix: / redirects to /app (tenant) or /admin (central)

This commit is contained in:
2026-05-07 05:06:25 +00:00
parent 8d82af2f54
commit 4d5e240602
+6 -1
View File
@@ -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.