Simple Privileges Roles for Laravel
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
migrations
src
composer.json
readme.md

readme.md

LaraPriv

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