feat: add dashboard page with Nuxt UI components and verified middleware
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\DashboardController;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Inertia\Inertia;
|
||||
|
||||
Route::get('/', function () {
|
||||
if (Auth::check()) {
|
||||
return redirect(config('auth-ui.redirects.login', '/dashboard'));
|
||||
}
|
||||
|
||||
return Inertia::render('Welcome', [
|
||||
'appName' => config('app.name'),
|
||||
]);
|
||||
});
|
||||
|
||||
Route::middleware(['auth', 'verified'])->group(function () {
|
||||
Route::get('/dashboard', DashboardController::class)->name('dashboard');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user