Download the PHP package juhniorsantos/laravel-simple-acl without Composer
On this page you can find all versions of the php package juhniorsantos/laravel-simple-acl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-simple-acl
Laravel Simple ACL
Requirements
- PHP 8.1
- Laravel 9+
Installation
- Export configuration and set the project's User model class name
- default is:
App\Models\User
- default is:
- Add
\RodrigoPedra\LaravelSimpleACL\Concerns\HasACL
trait to the project's User model - Run migrations
- Optionally load the included Middleware
- This will load and cache a logged in user's roles and permissions and define a gate to each permission
Usage
Create roles and permissions through the included RodrigoPedra\LaravelSimpleACL\Models\Role
and
RodrigoPedra\LaravelSimpleACL\Models\Permission
Eloquent models.
Permissions are meant to be grouped into a role, you can create a database seeder, or migration for your initial setup, for example:
You can then add or remove roles to individual users using the included trait's helper methods:
If you add the \RodrigoPedra\LaravelSimpleACL\Http\Middleware\LoadSimpleACL
middleware
to your middleware stack, you can use Laravel's gate to check for permissions:
Even on blade views
All versions of laravel-simple-acl with dependencies
illuminate/support Version ^6.20.12|^7.30.4|^8.22.1|^9.0|^10.0
illuminate/config Version ^6.20.12|^7.30.4|^8.22.1|^9.0|^10.0
illuminate/database Version ^6.20.12|^7.30.4|^8.22.1|^9.0|^10.0
illuminate/http Version ^6.20.12|^7.30.4|^8.22.1|^9.0|^10.0