From dae2a8d72551e442545334f819e38e7a29c64ec4 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Wed, 17 Mar 2021 05:17:22 -0700 Subject: [PATCH] Add unit to nutrients summary value --- app/Models/IngredientAmount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/IngredientAmount.php b/app/Models/IngredientAmount.php index 3931629..47a59f1 100644 --- a/app/Models/IngredientAmount.php +++ b/app/Models/IngredientAmount.php @@ -103,7 +103,7 @@ final class IngredientAmount extends Model $summary = []; foreach (Nutrients::all() as $nutrient) { $amount = round($this->{$nutrient['value']}(), 2); - $summary[] = "{$nutrient['label']}: {$amount}"; + $summary[] = "{$nutrient['label']}: {$amount}{$nutrient['unit']}"; } return implode(', ', $summary); }