(Fix) Call to a member function pluck() on array

This commit is contained in:
LostRager
2024-04-03 04:39:28 +02:00
committed by GitHub
parent 17c49b7558
commit 3152cc554f
+1 -1
View File
@@ -31,7 +31,7 @@ class TorrentResource extends JsonResource
'attributes' => [
'meta' => [
'poster' => isset($this->meta->poster) ? tmdb_image('poster_small', $this->meta->poster) : 'https://via.placeholder.com/90x135',
'genres' => isset($this->meta->genres) ? $this->meta->genres->pluck('name')->implode(', ') : '',
'genres' => isset($this->meta->genres) ? collect($this->meta->genres)->pluck('name')->implode(', ') : '',
],
'name' => $this->name,
'release_year' => $this->release_year,