Repository navigation
Group
Viames Marino edited this page Oct 19, 2026
·
2 revisions
Pair\Models\Group handles user groups and ACL relationships.
addAcl(int $ruleId): voidaddAllAcl(): voidgetAcls(): CollectiongetAllNotExistRules(): CollectiongetDefaultAcl(): ?AclsetDefaultAcl(int $aclId): voidgetUsers(): Collection
Lifecycle hooks:
-
_init(),afterCreate(),beforeUpdate(),beforeDelete()
use Pair\Models\Group;
$group = Group::findOrFail($groupId);
$group->addAcl($ruleId);
$default = $group->getDefaultAcl();
$users = $group->getUsers();- Default ACL handling ensures only one default rule per group.
- Deletion/update hooks enforce ACL consistency.
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4