'json', 'addresses' => 'json', 'other_details' => 'json', 'is_active' => 'boolean', 'dob' => 'date', 'monthly_income' => 'float', 'children_count' => 'integer', 'dependent_count' => 'integer', ]; /** * Get the virtual age attribute. */ public function getAgeAttribute(): ?int { if (!$this->dob) { return null; } return $this->dob->diffInYears(now()); } public function user() { return $this->belongsTo(User::class, 'user_id'); } public function emergencyContactUser() { return $this->belongsTo(User::class, 'emergency_contact_user_id'); } public function creator() { return $this->belongsTo(User::class, 'created_by'); } public function updater() { return $this->belongsTo(User::class, 'updated_by'); } }