More subuser Model updates.

This commit is contained in:
Dane Everitt 2017-02-09 19:38:54 -05:00
parent c8f6c93d26
commit 99812b0407
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 54 additions and 55 deletions

View file

@ -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.
*

View file

@ -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.
*

View file

@ -87,6 +87,6 @@ class Subuser extends Model
*/
public function permissions()
{
return $this->hasMany(Pemission::class);
return $this->hasMany(Permission::class);
}
}