diff --git a/app/Services/AssetSummaryService.php b/app/Services/AssetSummaryService.php index 6c622ad..cb3f1c3 100644 --- a/app/Services/AssetSummaryService.php +++ b/app/Services/AssetSummaryService.php @@ -248,9 +248,14 @@ class AssetSummaryService return null; } - $file = $product->file->toArray(); - $file['full_src'] = $product->file->src ?? null; + $fileModel = $product->file; + $src = (string) ($fileModel->src ?? ''); - return $file; + return [ + 'id' => $fileModel->id, + 'src' => $src, + 'full_src' => $src, + 'url' => $fileModel->url ?? null, + ]; } }