megacommit
This commit is contained in:
parent
2451ab45cb
commit
34ed81516b
51 changed files with 1200 additions and 251 deletions
|
@ -22,4 +22,16 @@ class Permission extends Model
|
|||
return $this->belongsToMany('App\Models\User', 'user_permissions', 'permission_id', 'user_id');
|
||||
}
|
||||
|
||||
public function find(mixed $permission_id)
|
||||
{
|
||||
return $this->where('permission_id', $permission_id)->first();
|
||||
}
|
||||
|
||||
public function create(array $array)
|
||||
{
|
||||
$this->permission_name = $array['permission_name'];
|
||||
$this->save();
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue