add password must be changed to user nova resource

This commit is contained in:
nurmuhammet committed 2025-02-21 01:30:12 +05:00
1 parent 0f3e0d6490
commit f5083821bc
5 files changed
+48 -5

No files matched your search

+5
View File
@@ -11,6 +11,7 @@
use Illuminate\Validation\Rules;
use Laravel\Nova\Fields\BelongsToMany;
use Laravel\Nova\Fields\Boolean;
use Laravel\Nova\Fields\Hidden;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\MorphToMany;
use Laravel\Nova\Fields\Password;
@@ -106,6 +107,10 @@ public function fields(NovaRequest $request): array
->creationRules('required', Rules\Password::defaults())
->updateRules('nullable', Rules\Password::defaults()),
Hidden::make('password_must_be_changed')
->default(true)
->hideWhenUpdating(),
Boolean::make(__('Phone verified'), 'phone_verified_at')
->default(false)
->fillUsing(function (NovaRequest $request, $model, string $attribute, string $requestAttribute) {