nimuli/routes/web.php

26 lines
705 B
PHP

<?php
use Illuminate\Support\Facades\Route;
Route::get('/health', function () {
return response()->json(['status' => 'ok', 'timestamp' => now()->toISOString()]);
});
Route::view('/', 'welcome');
Route::view('dashboard', 'dashboard')
->middleware(['auth', 'verified'])
->name('dashboard');
Route::view('profile', 'profile')
->middleware(['auth'])
->name('profile');
// Redirect service — handles slugs on main domain and custom domains
// Placed after all named routes so dashboard/profile etc. are not caught here
Route::get('/{slug}', \App\Http\Controllers\RedirectController::class)
->where('slug', '[a-zA-Z0-9_-]+')
->name('redirect');
require __DIR__.'/auth.php';