File tree 2 files changed +16
-10
lines changed
2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,16 @@ class Customer extends Model
20
20
];
21
21
22
22
/**
23
- * The attributes that should be cast to native types .
23
+ * Get the attributes that should be cast.
24
24
*
25
- * @var array
25
+ * @return array<string, string>
26
26
*/
27
- protected $ casts = [
28
- 'id ' => 'integer ' ,
29
- ];
27
+ protected function casts (): array
28
+ {
29
+ return [
30
+ 'id ' => 'integer ' ,
31
+ ];
32
+ }
30
33
31
34
public function pets (): BelongsToMany
32
35
{
Original file line number Diff line number Diff line change @@ -20,13 +20,16 @@ class Pet extends Model
20
20
];
21
21
22
22
/**
23
- * The attributes that should be cast to native types .
23
+ * Get the attributes that should be cast.
24
24
*
25
- * @var array
25
+ * @return array<string, string>
26
26
*/
27
- protected $ casts = [
28
- 'id ' => 'integer ' ,
29
- ];
27
+ protected function casts (): array
28
+ {
29
+ return [
30
+ 'id ' => 'integer ' ,
31
+ ];
32
+ }
30
33
31
34
public function owners (): BelongsToMany
32
35
{
You can’t perform that action at this time.
0 commit comments