Skip to content

Commit

Permalink
🎨 Change User casts to the casts method
Browse files Browse the repository at this point in the history
🎨 Cast `password` as `hashed`
  • Loading branch information
Log1x committed Apr 1, 2024
1 parent b477508 commit 5784f84
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@ class User extends Authenticatable implements FilamentUser
];

/**
* The attributes that should be cast.
* Get the attributes that should be cast.
*
* @var array<string, string>
* @return array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}

/**
* Determine if the user can access the Filament admin panel.
Expand Down

0 comments on commit 5784f84

Please sign in to comment.