Download the PHP package binssoft/permissionmanager without Composer
On this page you can find all versions of the php package binssoft/permissionmanager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download binssoft/permissionmanager
More information about binssoft/permissionmanager
Files in binssoft/permissionmanager
Package permissionmanager
Short Description It is a permission manager library for laravel
License MIT
Informations about the package permissionmanager
Laravel Permission Management
A permission management system to handel the user role in a Laravel 5 project.
Installation
This package is only installed via composer by requiring the
composer require binssoft/permissionmanager
package in your project's composer.json
. (The installation may take a while.)
Next, add the service provider to config/app.php
.
Configuration
After proper vendor publish few files are created and 4 tables will be created in the configured database after migration.
1) in app/
folder 4 models will generated Roles.php
, Navigations.php
, UserRoles.php
, RolePermissions.php
2) in database\seeds
folder RoleSeeder.php
will be created
Few demo role records will be inserted in the roles
Table
Now your permission library is configured perfectly.
How to Uses
Assign user Role
Get user Role
Get all navigations
namespace will be a array with value of your different namespaces like admin,site etc.
Set role Permission
- 1st parameter : role id
- 2nd parameter : route name
- 3rd parameter : want to save or delete (true/false)
Check current route access permission
$permission
will return true
or flase
That's it! You're good to go.
Please click on "Star" in github if it is usefull for you.