Skip to content

Commit ab49ea4

Browse files
committed
Convert $casts property to method
1 parent 36ab0a8 commit ab49ea4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

app/Models/User.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ class User extends Authenticatable
3232
];
3333

3434
/**
35-
* The attributes that should be cast to native types.
35+
* Get the attributes that should be cast.
3636
*
37-
* @var array
37+
* @return array<string, string>
3838
*/
39-
protected $casts = [
40-
'email_verified_at' => 'datetime',
41-
];
39+
protected function casts(): array
40+
{
41+
return [
42+
'email_verified_at' => 'datetime',
43+
];
44+
}
4245
}

0 commit comments

Comments
 (0)