Completed subuser system

This commit is contained in:
Dane Everitt 2016-01-18 19:57:10 -05:00
parent 251700bc2e
commit ac6edc4d64
16 changed files with 731 additions and 15 deletions

View file

@ -14,6 +14,13 @@ class Permission extends Model
*/
protected $table = 'permissions';
/**
* Fields that are not mass assignable.
*
* @var array
*/
protected $guarded = ['id', 'created_at', 'updated_at'];
public function scopePermission($query, $permission)
{
return $query->where('permission', $permission);

View file

@ -15,6 +15,20 @@ class Subuser extends Model
*/
protected $table = 'subusers';
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = ['daemonSecret'];
/**
* Fields that are not mass assignable.
*
* @var array
*/
protected $guarded = ['id', 'created_at', 'updated_at'];
/**
* @var mixed
*/