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