From 5daad9303dfbe9e757d0195cfb9cf01cbbaedc92 Mon Sep 17 00:00:00 2001 From: Shift Date: Fri, 5 Apr 2024 18:36:51 +0000 Subject: [PATCH] Convert `$casts` property to method --- app/Models/User.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index c2e6518e..483e4b52 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -47,14 +47,17 @@ class User extends Authenticatable implements FilamentUser ]; /** - * The attributes that should be cast. + * Get the attributes that should be cast. * - * @var array + * @return array */ - protected $casts = [ - 'email_verified_at' => 'datetime', - 'password' => 'hashed', - ]; + protected function casts(): array + { + return [ + 'email_verified_at' => 'datetime', + 'password' => 'hashed', + ]; + } public function canAccessPanel(Panel $panel): bool {