fix movie similar error

This commit is contained in:
Constantin Plaiasu 2024-08-30 16:12:40 +03:00
parent 4951b52fc9
commit 8bbd2b8624

View file

@ -227,6 +227,7 @@ public function formatApiResponse(Object $data, $with_pagination = true, $route
'slug' => Str::slug($item->title ?? $item->name),
'year' => Carbon::parse($item->release_date ?? '')->format('Y'),
'route' => isset($item->title) ? 'movie' : 'show',
'type' => isset($item->title) ? 'movie' : 'show',
// 'count' => $key + 1
];