public function getVitaminB6() { $nutrient = $this->nutrients()->whereNutrientId(Nutrient::VitaminB6()->getID())->first(); return $nutrient != null ? $nutrient->pivot->amount_in_food : 0; }