Download the PHP package alifcoder/permissions without Composer
On this page you can find all versions of the php package alifcoder/permissions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alifcoder/permissions
More information about alifcoder/permissions
Files in alifcoder/permissions
Package permissions
Short Description A simple role and permission management package for Laravel.
License MIT
Informations about the package permissions
๐ Alif Permissions
A simple, flexible role and permission management system for Laravel applications โ designed to support
Gate::before, SUPER ADMIN logic, modular apps (nwidart/laravel-modules), and dynamic user model resolution.
โจ Features
- Role and permission management with pivot tables
SUPER ADMINbypass support usingGate::before()HasRolestrait for easy user integration- Dynamically configurable user model
- Language file localization (EN, customizable)
- Clean service provider with publishable config and migrations
- Works with modular Laravel apps (like
nwidart/laravel-modules)
๐ฆ Requirements
- PHP
>=8.2 - Laravel
^11.0 || ^12.0 || ^13.0
๐ Installation
Then publish the config, translations, and migrations:
This will publish:
lang/vendor/permissionsconfig/permission.phpdatabase/migrations/xxxx_xx_xx_xxxxxx_create_permissions_table.php
โ๏ธ Configuration
Inside config/permissions.php:
You can override the default user model or super-admin slug here.
๐งฌ Traits
In your User model, add the trait:
๐ Super Admin Access
Add this in your app (e.g., AuthServiceProvider) โ or it's auto-registered by the package:
This lets super-admin users bypass all policy/gate checks.
๐ง Usage
Assign Roles & Permissions
Check Permissions
๐ Localization
The package includes English (en) translations. To override or translate:
Then add resources/lang/vendor/permissions/{locale}/permissions.php.
๐งโ๐ป Usage macro
Also you can use Route macro to check permissions and roles:
๐งฉ Folder Structure
๐งน Clear permission caches
Run this command to clear the permission cache:
๐งน Uninstall (Clean Up)
Run this command before removing the package:
๐ License
MIT ยฉ Shukhratjon Yuldashev
๐ Contributing
Pull requests and suggestions are welcome!