We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27c8693 commit 8b1a240Copy full SHA for 8b1a240
routes/web.php
@@ -1,17 +1,10 @@
1
<?php
2
3
use Illuminate\Support\Facades\Route;
4
-use Inertia\Inertia;
5
6
-Route::get('/', function () {
7
- return Inertia::render('welcome');
8
-})->name('home');
+Route::inertia('/', 'welcome')->name('home');
9
10
-Route::middleware(['auth'])->group(function () {
11
- Route::get('dashboard', function () {
12
- return Inertia::render('dashboard');
13
- })->name('dashboard');
14
-});
+Route::inertia('/dashboard', 'dashboard')->name('dashboard')->middleware('auth');
15
16
-require __DIR__.'/settings.php';
17
-require __DIR__.'/auth.php';
+require __DIR__ . '/settings.php';
+require __DIR__ . '/auth.php';
0 commit comments