Download the PHP package deifhelt/laravel-permissions-manager without Composer
On this page you can find all versions of the php package deifhelt/laravel-permissions-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-permissions-manager
Laravel Permissions Manager
A powerful wrapper around spatie/laravel-permission that manages permissions and roles through a simple configuration file.
Features
- Config-Driven: Define permissions in
config/permissions.php - Auto-CRUD Generation: Automatically generates CRUD permissions
- Smart Syncing: Efficient database synchronization
- Smart Translations: Automatic human-readable labels
- Policy Trait: Simplify authorization with
HasPermissionCheck
Note: This package wraps
spatie/laravel-permission. For advanced features like blade directives, middleware usage, caching, and direct role/permission assignment, see the official Spatie documentation.
Installation
Install via Composer (Spatie Permission is included automatically):
Publish this package configuration:
This creates config/permissions.php (this package's permission definitions).
Publish Spatie Permission configuration and migrations:
This creates config/permission.php (Spatie's internal configuration) and migration files.
Clear config cache:
Run migrations:
Add the HasRoles trait to your User model:
Configuration
Standard CRUD Permissions
Define resources to auto-generate read, create, update, destroy permissions:
This generates: read users, create users, update users, destroy users, etc.
Special Permissions
Add custom actions that don't fit the CRUD pattern:
This generates: ban users, impersonate users, view-logs system, etc.
Super Admin (Bypass)
Define roles that bypass all permission checks (Super Admin). These roles are defined separately because they inherently have all permissions.
Note:
- The
permissions:synccommand automatically creates these roles in the database for you. - Global Bypass: This package registers a
Gate::beforecallback. This ensures that@can('any'),$user->can('any'), and Policies automatically returntruefor these users, even if they have 0 permissions in the database.
Roles
Define standard roles and assign their specific permissions:
bash php artisan vendor:publish --tag=permissions-translations
See Translations Documentation for full details.
Note: The system automatically respects your
config('app.locale')and any runtime locale changes.
Sync Permissions
After configuring your permissions and roles, sync them to the database:
Alternative: Using Database Seeders
For automated deployments, CI/CD pipelines, or NativePHP applications where you can't run artisan commands interactively, use the included seeder:
This is particularly useful for NativePHP desktop applications where the database is created on first run.
Using with Policies
Use the HasPermissionCheck trait to simplify policy authorization:
Features:
- Admin Bypass: Users with
adminrole automatically pass all checks - Permission Validation: Verifies user has required permission
- Ownership Check: When passing a model, validates
user_idmatches
Documentation
- Installation - Complete setup guide including Laravel 11/12 middleware
- Configuration & Usage - Deep dive into permissions, roles, and commands
- Translations - Translate permissions automatically
- Policies - Security patterns and trait usage
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-permissions-manager with dependencies
illuminate/contracts Version ^10.0||^11.0||^12.0||^13.0
illuminate/support Version ^10.0||^11.0||^12.0||^13.0
spatie/laravel-permission Version ^6.0