hosseinhezami/laravel-permission-manager
Enterprise-grade Laravel permission manager combining RBAC, ABAC, role hierarchy, multi-tenancy, wildcard and temporary permissions, condition engine, multi-guard support, audit logging, middleware DSL, Blade directives, and Gate/Policy integration.
This patch release resolves the installation issues reported on v2.0.0,
so php artisan migrate now works reliably on MySQL, PostgreSQL
and SQLite for fresh installations.
teams is now created before
user_roles and user_permissions, fixing foreign-key failures on
MySQL where the referenced table must exist first.team_id column is
no longer placed inside a composite PRIMARY KEY (rejected by MySQL).
user_roles now uses a safe primary key with a
UNIQUE(user_id, role_id, team_id) constraint.2026_08_20_000001 โฆ 2026_08_20_000014) and cleaned up so a fresh
install always succeeds in the correct order.roles ยท permission_groups ยท permissions ยท teams ยท
role_permissions ยท user_roles ยท user_permissions ยท role_inherits ยท
permission_sets ยท permission_set_items ยท team_user ยท
permission_conditions ยท permission_audits ยท authorization_logs
Migrations in this release are fresh-install schemas. If you are upgrading an existing database:
php artisan role:export roles.jsonmigrations table), then run:
php artisan migratephp artisan role:import roles.jsonโ Fresh installations are unaffected โ just run
composer require+php artisan migrate.
A major release that transforms the package into an enterprise-grade authorization platform.
!users.delete)givePermissionTo, denyPermissionTo)guard_namecan()/cannot() supportPolicyResolverany/all/not modes[@role](https://github.com/role), [@hasanyrole](https://github.com/hasanyrole), [@unlesspermission](https://github.com/unlesspermission), etc.permission:why โ explain why access was deniedpermission:doctor โ system health diagnosticspermission:tree โ role hierarchy visualizationpermission:explain โ JSON authorization debugpermission:validate โ configuration validationpermission:prune โ cleanup expired permissionspermission:cache:warm โ cache preloadingpermission:generate-resource โ CRUD permission generatorInteractsWithPermissions, PermissionAssertionscomposer require hosseinhezami/laravel-permission-manager:^2.0
php artisan vendor:publish --provider="HosseinHezami\PermissionManager\PermissionManagerServiceProvider" --tag="config"
php artisan vendor:publish --provider="HosseinHezami\PermissionManager\PermissionManagerServiceProvider" --tag="migrations"
php artisan migrate
No breaking changes โ all v1 methods, commands, and directives remain unchanged.
| Feature | v1.x | v2.0 |
|---|---|---|
| Direct Permissions | โ | โ |
| Role Hierarchy | โ | โ |
| Allow/Deny | โ | โ |
| Teams/Multi-Tenancy | โ | โ |
| ABAC | โ | โ |
| Audit Logging | โ | โ |
| Multi-Guard (real) | โ ๏ธ | โ |
| Smart Cache | Basic | Advanced |
| Tests | 0 | 141 |
Special thanks to all contributors and users who provided feedback during development.
Full Changelog: https://github.com/hosseinhezami/laravel-permission-manager/compare/v1.1.0...v2.0.0
Added support for Laravel 13
feat: Enhanced permission checking with array support and flexible validation logic
A comprehensive and advanced permission management system for Laravel applications. This package provides a robust role-based access control (RBAC) system with support for wildcard permissions, blade directives, Artisan commands, and a fluent API.
How can I help you explore Laravel packages today?