Skip to content

Commit 6154c34

Browse files
committed
Shorthand for renders.
1 parent f599a00 commit 6154c34

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

routes/settings.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@
1515
Route::get('settings/password', [PasswordController::class, 'edit'])->name('password.edit');
1616
Route::put('settings/password', [PasswordController::class, 'update'])->name('password.update');
1717

18-
Route::get('settings/appearance', function () {
19-
return Inertia::render('settings/appearance');
20-
})->name('appearance');
18+
Route::get('settings/appearance', fn () => Inertia::render('settings/appearance'))->name('appearance');
2119
});

routes/web.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
use Illuminate\Support\Facades\Route;
44
use Inertia\Inertia;
55

6-
Route::get('/', function () {
7-
return Inertia::render('welcome');
8-
})->name('home');
6+
Route::get('/', fn () => Inertia::render('welcome'))->name('home');
97

108
Route::middleware(['auth', 'verified'])->group(function () {
11-
Route::get('dashboard', function () {
12-
return Inertia::render('dashboard');
13-
})->name('dashboard');
9+
Route::get('dashboard', fn () => Inertia::render('dashboard'))->name('dashboard');
1410
});
1511

1612
require __DIR__.'/settings.php';

0 commit comments

Comments
 (0)