feat: modify dashboard

This commit is contained in:
Leon 2026-01-08 14:23:52 +01:00
parent fde3562efc
commit 853b12088c
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@
namespace App\Filament\Resources\Users\Schemas;
use App\Enums\UserRole;
use Illuminate\Support\Facades\Hash;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
@ -35,7 +36,9 @@ class UserForm
DateTimePicker::make('email_verified_at'),
TextInput::make('password')
->password()
->required(),
->dehydrateStateUsing(fn ($state) => Hash::make($state))
->dehydrated(fn ($state) => filled($state))
->required(fn (string $operation): bool => $operation === 'create'),
Select::make('role')
->options(UserRole::class)
->default('user')