From 13d75bb03e378ce4c53e95e2a0d56d0b19602891 Mon Sep 17 00:00:00 2001 From: Fabrice Planchette Date: Fri, 8 Mar 2024 15:37:02 +0100 Subject: [PATCH] Check features on profile edit --- .../filament/pages/edit-profile.blade.php | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/stubs/resources/views/filament/pages/edit-profile.blade.php b/stubs/resources/views/filament/pages/edit-profile.blade.php index 050f02b..46a33ef 100644 --- a/stubs/resources/views/filament/pages/edit-profile.blade.php +++ b/stubs/resources/views/filament/pages/edit-profile.blade.php @@ -1,7 +1,35 @@ - @livewire(Laravel\Jetstream\Http\Livewire\UpdateProfileInformationForm::class) - @livewire(Laravel\Jetstream\Http\Livewire\UpdatePasswordForm::class) - @livewire(Laravel\Jetstream\Http\Livewire\TwoFactorAuthenticationForm::class) - @livewire(Laravel\Jetstream\Http\Livewire\LogoutOtherBrowserSessionsForm::class) - @livewire(Laravel\Jetstream\Http\Livewire\DeleteUserForm::class) + @if (Laravel\Fortify\Features::canUpdateProfileInformation()) + @livewire(Laravel\Jetstream\Http\Livewire\UpdateProfileInformationForm::class) + + + @endif + + @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::updatePasswords())) +
+ @livewire(Laravel\Jetstream\Http\Livewire\UpdatePasswordForm::class) +
+ + + @endif + + @if (Laravel\Fortify\Features::canManageTwoFactorAuthentication()) +
+ @livewire(Laravel\Jetstream\Http\Livewire\TwoFactorAuthenticationForm::class) +
+ + + @endif + +
+ @livewire(Laravel\Jetstream\Http\Livewire\LogoutOtherBrowserSessionsForm::class) +
+ + @if (Laravel\Jetstream\Jetstream::hasAccountDeletionFeatures()) + + +
+ @livewire(Laravel\Jetstream\Http\Livewire\DeleteUserForm::class) +
+ @endif