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