birthdate)) { return null; } $age = $this->birthdate->diffInYears(Carbon::now()); return $age; } /** * Returns the birthdate of the kid. * * @return string */ public function getBirthdate() { if (is_null($this->birthdate)) { return null; } return $this->birthdate; } /** * Return the first name of the kid. * @return string */ public function getFirstName() { if (is_null($this->first_name)) { return null; } return $this->first_name; } }