blob: 97fd3a1fb3a7c87df79407d04b3ef9376ca2dec3 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace LdapRecord\Models\ActiveDirectory\Concerns;
4
5use LdapRecord\Models\ActiveDirectory\Relations\HasOnePrimaryGroup;
6
7trait HasPrimaryGroup
8{
9 /**
10 * Returns a new has one primary group relationship.
11 *
12 * @param mixed $related
13 * @param string $relationKey
14 * @param string $foreignKey
15 *
16 * @return HasOnePrimaryGroup
17 */
18 public function hasOnePrimaryGroup($related, $relationKey, $foreignKey = 'primarygroupid')
19 {
20 return new HasOnePrimaryGroup($this->newQuery(), $this, $related, $relationKey, $foreignKey);
21 }
22}