More subuser Model updates.
This commit is contained in:
parent
c8f6c93d26
commit
99812b0407
8 changed files with 54 additions and 55 deletions
|
@ -28,6 +28,14 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class Permission extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Should timestamps be used on this model.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
|
|
|
@ -196,6 +196,16 @@ class Server extends Model
|
|||
return $this->belongsTo(User::class, 'owner_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the subusers associated with a server.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function subusers()
|
||||
{
|
||||
return $this->hasMany(Subuser::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default allocation for a server.
|
||||
*
|
||||
|
|
|
@ -87,6 +87,6 @@ class Subuser extends Model
|
|||
*/
|
||||
public function permissions()
|
||||
{
|
||||
return $this->hasMany(Pemission::class);
|
||||
return $this->hasMany(Permission::class);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue