- bientôt disponible -
-- {{ product.name }} -
- -+ bientôt disponible +
+
- diff --git a/app/Http/Resources/ProductResource.php b/app/Http/Resources/ProductResource.php index 9a32f4bb..0a6f8379 100644 --- a/app/Http/Resources/ProductResource.php +++ b/app/Http/Resources/ProductResource.php @@ -44,11 +44,16 @@ class ProductResource extends JsonResource { // @phpcs:enable $data = array_merge( - ['discountedPriceHt' => $this->product->discountedPriceHt], \array_intersect_key( $this->product->toArray(), self::$skeleton - ) + ), + ['discountedPriceHt' => $this->product->discountedPriceHt], + [ + 'nutriscore' => (isset($this->product->foodProduct->nutriscore)) ? + $this->product->foodProduct->nutriscore : + null + ] ); $data['description'] = clean($data['description']); diff --git a/resources/views/bo/products/food_product.blade.php b/resources/views/bo/products/food_product.blade.php index dbff993b..49c11890 100644 --- a/resources/views/bo/products/food_product.blade.php +++ b/resources/views/bo/products/food_product.blade.php @@ -219,7 +219,7 @@
Tous les rayons
- bientôt disponible -
-+ bientôt disponible +
+
-