mirror of https://github.com/kcal-app/kcal.git
Add unit to nutrients summary value
This commit is contained in:
parent
f8b2fdd58c
commit
dae2a8d725
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue