diff --git a/app/Http/Controllers/api/v1/OrderController.php b/app/Http/Controllers/api/v1/OrderController.php index 084dd59..a5cab88 100644 --- a/app/Http/Controllers/api/v1/OrderController.php +++ b/app/Http/Controllers/api/v1/OrderController.php @@ -44,8 +44,8 @@ protected function mapProducts($products) { return $products->map(function ($product) { return [ - 'title' => $product->product->title, - 'image' => $product->product->image + 'title' => $product?->product?->title, + 'image' => $product?->product?->image ]; }); }