muhbayu / larapriv
Simple Privilege Roles
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/muhbayu/larapriv
Requires
- php: ~5.6|~7.0
This package is auto-updated.
Last update: 2025-09-17 01:21:57 UTC
README
Simple Privileges Roles for Laravel
Installation
This package can be used in Laravel 5.7 or higher.
You can install the package via composer:
composer require muhbayu/larapriv
In Laravel 5.5 or higher the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php
file:
'providers' => [ // ... MuhBayu\LaraPriv\LaraPrivServiceProvider::class, ];
You can publish Provider:
php artisan vendor:publish --provider="MuhBayu\LaraPriv\LaraPrivServiceProvider"
After the migration has been published you can create the privilege role- and permission-tables by running the migrations:
php artisan migrate
Then, in app/Http/Kernel.php
, register the middlewares:
protected $routeMiddleware = [ // ... 'privileges.roles' => \MuhBayu\LaraPriv\Middleware\RolesPermission::class, ];
Documentation
Coming soon