hasMany(User::class, 'position_id'); } public function departments() { return $this->belongsToMany(Department::class, 'department_position'); } }