예제 #1
0
 public function getZinc()
 {
     $nutrient = $this->nutrients()->whereNutrientId(Nutrient::Zinc()->getID())->first();
     return $nutrient != null ? $nutrient->pivot->amount_in_food : 0;
 }