diff --git a/app/Models/List/Playlist.php b/app/Models/List/Playlist.php index adeb037e5..65665c2d8 100644 --- a/app/Models/List/Playlist.php +++ b/app/Models/List/Playlist.php @@ -210,4 +210,14 @@ public function tracks(): HasMany { return $this->hasMany(PlaylistTrack::class, PlaylistTrack::ATTRIBUTE_PLAYLIST); } + + /** + * Only get the attributes as an array to prevent recursive toArray() calls. + * + * @return array + */ + public function toSearchableArray(): array + { + return $this->attributesToArray(); + } }