refactor: Adjust password field to set a default value only on creation and be visible only during creation.
This commit is contained in:
parent
705dfe6537
commit
dceeabdf7e
@ -88,7 +88,8 @@ public static function form(Schema $schema): Schema
|
|||||||
->searchable(),
|
->searchable(),
|
||||||
|
|
||||||
Hidden::make('password')
|
Hidden::make('password')
|
||||||
->default(fn (?User $record): ?string => $record ? null : config('auth.password_default')),
|
->default(fn (): string => config('auth.password_default'))
|
||||||
|
->visibleOn('create'),
|
||||||
])
|
])
|
||||||
->columns(1);
|
->columns(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user