File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 15
15
"spatie/laravel-package-tools" : " ^1.14.0"
16
16
},
17
17
"require-dev" : {
18
+ "laravel/framework" : " ^10.48" ,
18
19
"laravel/pint" : " ^1.0" ,
19
20
"nunomaduro/collision" : " ^7.8" ,
20
21
"orchestra/testbench" : " ^8.8|^9.0" ,
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function book(): Attribute
26
26
{
27
27
return Attribute::make (
28
28
get: fn () => $ this ->attributes ['book ' ] ?? null
29
- ? new Book ($ this ->fromJson ($ this ->attributes ['book ' ]))
29
+ ? new Book ($ this ->fromJson ($ this ->attributes ['book ' ] ?? ' {} ' ))
30
30
: null
31
31
);
32
32
}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public function refreshBooks(bool $force = false): self
34
34
public function books (): Attribute
35
35
{
36
36
return Attribute::make (
37
- get: fn () => collect ($ this ->fromJson ($ this ->attributes ['book ' ] ?? [] ))
37
+ get: fn () => collect ($ this ->fromJson ($ this ->attributes ['books ' ] ?? ' {} ' ))
38
38
->whereNotNull ()
39
39
->map (fn ($ attributes ) => new Book ($ attributes ))
40
40
->values ()
You can’t perform that action at this time.
0 commit comments