diff --git a/routes/web.php b/routes/web.php index 247960dd..9a8813e3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -3,15 +3,14 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Route; -Route::view('/', 'welcome')->name('home'); +Route::get('/', function () { + return auth()->check() + ? redirect()->route('dashboard') + : redirect()->route('login'); +})->name('home'); require __DIR__.'/settings.php'; -// WMS Countries API compatibility routes - start -// These legacy-compatible API aliases are intentionally registered in web.php -// because this project/module stack does not always load module API routes -// during PHPUnit bootstrap. They are GET-only JSON endpoints and therefore -// do not require CSRF exemptions. Route::get('/api/countries/resolve/{code}', function (string $code) { $normalised = strtoupper(trim($code)); @@ -70,4 +69,4 @@ Route::get('/api/countries/{code}/subdivisions', function (string $code) { return response()->json(['data' => $subdivisions]); })->name('countries.api.subdivisions.compat'); -// WMS Countries API compatibility routes - end +