Completed subuser system
This commit is contained in:
parent
251700bc2e
commit
ac6edc4d64
16 changed files with 731 additions and 15 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue