Download the PHP package techgonia/pbac without Composer
On this page you can find all versions of the php package techgonia/pbac. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download techgonia/pbac
More information about techgonia/pbac
Files in techgonia/pbac
Download techgonia/pbac
More information about techgonia/pbac
Files in techgonia/pbac
Vendor techgonia
Package pbac
Short Description A powerful Policy-Based Access Control (PBAC) system for Laravel. Combines RBAC, ABAC, and ACL into a unified, fine-grained permission system.
License MIT
Homepage https://github.com/techgonia/pbac
Package pbac
Short Description A powerful Policy-Based Access Control (PBAC) system for Laravel. Combines RBAC, ABAC, and ACL into a unified, fine-grained permission system.
License MIT
Homepage https://github.com/techgonia/pbac
Please rate this library. Is it a good library?
Informations about the package pbac
Laravel PBAC (Policy-Based Access Control)
[]() [
]()
A powerful, flexible, and Policy-Based Access Control (PBAC) system for Laravel 1+. Combines the best of RBAC (Role-Based), ABAC (Attribute-Based), and ACL (Access Control List) into a unified, fine-grained permission system.
โจ Features
- Fine-Grained Permissions - Control access at user, group, team, and resource levels
- Deny-First Security - Explicit deny rules always override allow rules
- Flexible Targeting - Apply rules to individual users, groups, teams, or any combination
- Priority-Based Rules - Control rule evaluation order with priority levels
- Attribute-Based Conditions - Dynamic permissions based on runtime attributes (IP, user level, resource state)
- High Performance - Optimized queries with caching support
- Laravel Integration - Seamless integration with Laravel's Gate and Blade directives
- Super Admin Bypass - Built-in super admin support
- 100% Test Coverage - Comprehensive test suite with 212 tests
๐ Requirements
- PHP 8.1 or higher
- Laravel 11.0 or 12.0
- Database: MySQL 8.0+, PostgreSQL 12+, or SQLite 3.35+
Quick Start
Add Traits to Your User Model
Basic Example
๐ Documentation
Getting Started
- Installation Guide - Step-by-step installation instructions
- Overview - What is PBAC and why use it
- Core Concepts - Understanding targets, resources, actions, and rules
Usage Guides
- Basic Usage - Creating and checking permissions
- Facade Usage - Using the Pbac facade (recommended)
- Use Cases - Real-world application patterns and examples
- Configuration - Complete configuration reference
Technical Reference
- Architecture - Internal architecture and design decisions
- API Reference - Complete API documentation
๐ก Core Concepts
The PBAC Model
PBAC uses a rule-based system where each rule defines:
- Target: Who (user, group, team)
- Resource: What (post, file, setting, user, impersonation)
- Action: How (view, edit, delete, custom actions)
- Effect: Allow or Deny
- Conditions(optional): When (IP restrictions, attribute checks)
Security Model: Deny-First
Deny rules ALWAYS override allow rules, regardless of priority:
๐ฏ Common Use Cases
1. Group-Based Permissions
2. IP-Based Restrictions
3. Attribute-Based Access
4. Team Isolation
๐ฅ Advanced Features
Super Admin Bypass
Laravel Gate Integration
Blade Directives
Factory Helpers
๐งช Testing
Test Suite: 212 tests
- 133 Unit tests
- 70 Integration tests
- 68 Regression tests
๐ค Contributing
Contributions welcome! Please see CONTRIBUTING.md.
๐ License
MIT License - see LICENSE.md
๐ Credits
Built with โค๏ธ for Laravel developers
All versions of pbac with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.4
illuminate/database Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
spatie/laravel-package-tools Version ^1.16
illuminate/database Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
spatie/laravel-package-tools Version ^1.16
The package techgonia/pbac contains the following files
Loading the files please wait ...