-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
here is solution:
in Forms/Fields/ApplicationFields.php
removed default function because its not working
added controllable required from config
added default in dehydrateStateUsing
if ($key == 'admin.password') {
$applicationFields[] = TextInput::make('applications.' . $key)
->required($value['required'])
->label($value['label'])
->password()
->maxLength(255)
->dehydrateStateUsing(
fn ($state) => !blank($state) ?
Hash::make($state) :
Hash::make($value['default'])
);
} else {
$applicationFields[] = TextInput::make('applications.' . $key)
->label($value['label'])
->required($value['required'])
->rules($value['rules'])
->default($value['default'] ?? '');
}
Metadata
Metadata
Assignees
Labels
No labels