Update subuser API output to work correctly
This commit is contained in:
parent
34bf452bef
commit
66ead2f682
3 changed files with 9 additions and 4 deletions
|
@ -168,11 +168,11 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
/**
|
||||
* Gets the subusers associated with a server.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function subusers()
|
||||
{
|
||||
return $this->hasManyThrough(User::class, Subuser::class, 'server_id', 'id', 'id', 'user_id');
|
||||
return $this->hasMany(Subuser::class, 'server_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue