megacommit

This commit is contained in:
Didier Slof 2023-02-02 08:17:38 +01:00
parent 2451ab45cb
commit 34ed81516b
Signed by: didier
GPG key ID: 01E71F18AA4398E5
51 changed files with 1200 additions and 251 deletions

View file

@ -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;
}
}