enadstack/laravel-roles
最新稳定版本:v1.3.6
Composer 安装命令:
composer require enadstack/laravel-roles
包简介
Reusable Roles & Permissions (single or multi-tenant teams) on spatie/laravel-permission
README 文档
README
A reusable, multi-tenant, guard-aware ACL system for Laravel applications built on top of spatie/laravel-permission.
Features
- Contract-based architecture with dependency injection
- Three tenancy modes: single, team-scoped, multi-database
- Guard-aware role and permission management
- Contextual caching (tenant, guard, locale aware)
- Permission matrix with efficient queries (no N+1)
- Diff-based permission sync with wildcard support
- Optional Vue UI (Inertia.js + shadcn-vue)
- Comprehensive artisan commands
- Full i18n support for labels and descriptions
Requirements
- PHP 8.2+
- Laravel 12.0+
- spatie/laravel-permission 6.0+
Supported Tenancy Modes
| Mode | Description |
|---|---|
single |
Non-multi-tenant applications |
team_scoped |
Spatie's built-in team feature |
multi_database |
External providers (stancl/tenancy, etc.) |
Installation
composer require enadstack/laravel-roles php artisan roles:install php artisan roles:sync
Documentation
- Installation
- Configuration
- Tenancy
- Guards
- Roles
- Permissions
- Permission Matrix
- Vue UI
- API Reference
- Caching
- Commands
- Testing
- Upgrading
- Troubleshooting
- Feature Roadmap
Changelog
See CHANGELOG.md for release history.
License
MIT License. See LICENSE for details.
Credits
- Enad Abuzaid
- Built on spatie/laravel-permission
统计信息
- 总下载量: 49
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-29