From e99a8ba86bbf57a238a0a898b57d1e61986327a9 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 19 Jan 2022 12:54:46 +0100 Subject: [PATCH] Update PROJECT.md --- Project/PROJECT.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Project/PROJECT.md b/Project/PROJECT.md index c2ddd08..1287ee9 100644 --- a/Project/PROJECT.md +++ b/Project/PROJECT.md @@ -680,6 +680,25 @@ where ... ) ``` +Php sample usage: + +```php +$where = PermissionAbstractMapper::helper() + ->group($groups) + ->account($account) + ->unit([null, 2]) + ->app([null, 1]) + ->... + ->permission(Permission::READ & Permission::WRITE) + +$obj = ThisMapper::get() + ->with('hasMany') + ->where('id', $request->getData('id', 'int') ?? 0) + ->where('', $where) + ->limit(1) + ->execute(); +``` + #### Option 2 1. Check if general permission exists -> just do query