hasMany(LeaveRequest::class, 'staff_member_id'); } public function dependents() { return $this->hasMany(StaffDependent::class, 'staff_id'); } // 4. Cast dates correctly protected $casts = [ // 'dob' => 'date', 'hire_date' => 'datetime', 'password' => 'hashed', // Laravel 10+ password casting ]; }