From a666f19017547aab86ed9d6ab00a8aeff4d1d4d6 Mon Sep 17 00:00:00 2001 From: Abdelmjid Saber <87904671+megoxv@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:18:53 +0200 Subject: [PATCH 1/2] add bcrypt hashing for password --- .../Resources/AccountResource/Form/Components/Password.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Filament/Resources/AccountResource/Form/Components/Password.php b/src/Filament/Resources/AccountResource/Form/Components/Password.php index bfae5fb..88fe360 100644 --- a/src/Filament/Resources/AccountResource/Form/Components/Password.php +++ b/src/Filament/Resources/AccountResource/Form/Components/Password.php @@ -13,6 +13,7 @@ public static function make(): Forms\Components\Field ->confirmed() ->visible(fn (Forms\Get $get) => $get('is_login')) ->password() + ->dehydrateStateUsing(fn($state) => bcrypt($state)) ->maxLength(255); } } From e385637ff7614a752eb98f57c91455530ac3ccef Mon Sep 17 00:00:00 2001 From: megoxv Date: Mon, 16 Dec 2024 15:19:20 +0000 Subject: [PATCH 2/2] Format Code --- .../Resources/AccountResource/Form/Components/Password.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Filament/Resources/AccountResource/Form/Components/Password.php b/src/Filament/Resources/AccountResource/Form/Components/Password.php index 88fe360..99e8c59 100644 --- a/src/Filament/Resources/AccountResource/Form/Components/Password.php +++ b/src/Filament/Resources/AccountResource/Form/Components/Password.php @@ -13,7 +13,7 @@ public static function make(): Forms\Components\Field ->confirmed() ->visible(fn (Forms\Get $get) => $get('is_login')) ->password() - ->dehydrateStateUsing(fn($state) => bcrypt($state)) + ->dehydrateStateUsing(fn ($state) => bcrypt($state)) ->maxLength(255); } }