parent
23e6e0510b
commit
6fda3b72e4
4 changed files with 17 additions and 5 deletions
|
@ -239,4 +239,14 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac
|
|||
{
|
||||
return $this->hasMany(Server::class, 'owner_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all servers that user is listed as a subuser of directly.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function subuserOf()
|
||||
{
|
||||
return $this->hasMany(Subuser::class);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue