belongsTo(Branch::class); } /** * Get the user who created the department. */ public function creator() { return $this->belongsTo(User::class, 'created_by'); } /** * Get the employees assigned to this department. */ public function employees() { return $this->hasMany(Employee::class); } public function desginations() { return $this->hasMany(Designation::class,'department_id','id'); } }