We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed4babf commit 178711bCopy full SHA for 178711b
src/Utils/HasBooksAttribute.php
@@ -34,7 +34,7 @@ public function refreshBooks(bool $force = false): self
34
public function books(): Attribute
35
{
36
return Attribute::make(
37
- get: fn () => collect($this->fromJson($this->attributes['books'] ?? '{}'))
+ get: fn () => collect($this->fromJson($this->attributes['books'] ?? '[]'))
38
->whereNotNull()
39
->map(fn ($attributes) => new Book($attributes))
40
->values()
0 commit comments