- Replaced deprecated `flux` components with `maryUI` counterparts (`flux:input` → `x-mary-input`, `flux:button` → `x-mary-button`, etc.). - Removed unused partials (`settings-heading.blade.php`) and outdated structures from Blade files. - Adjusted Livewire modal, form, and button implementations for consistency with `maryUI`. - Streamlined layout and theme styling for improved maintainability and readability.
37 lines
1.1 KiB
PHP
37 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Livewire\Settings\{Appearance, Profile, Security};
|
|
use Illuminate\Support\Facades\Route;
|
|
use Laravel\Fortify\Features;
|
|
|
|
// Grouping by the "Settings" sidebar category
|
|
Route::middleware(['auth'])->prefix('settings')->group(function (): void {
|
|
|
|
// Base settings redirect
|
|
Route::redirect('/', '/settings/profile')->name('settings');
|
|
|
|
// Profile Settings
|
|
Route::livewire('profile', Profile::class)->name('profile.edit');
|
|
|
|
// Settings that require email verification
|
|
Route::middleware(['verified'])->group(function (): void {
|
|
|
|
// Appearance Settings
|
|
Route::livewire('appearance', Appearance::class)->name('appearance.edit');
|
|
|
|
// Security Settings
|
|
Route::livewire('security', Security::class)
|
|
->middleware(
|
|
when(
|
|
Features::canManageTwoFactorAuthentication()
|
|
&& Features::optionEnabled(Features::twoFactorAuthentication(), 'confirmPassword'),
|
|
['password.confirm'],
|
|
[],
|
|
),
|
|
)
|
|
->name('security.edit');
|
|
});
|
|
});
|