Wallogit.com
2017 © Pedro Peláez
this is a user role package for laravel
This is a package about permissions of users in laravel, (*1)
, (*2)
Installation, (*3)
STEP 1 :, (*4)
composer require "ilbeygi/userpermission":"dev-master"
STEP 2 : Add provider in config/app.php, (*5)
'providers' => [ ... Ilbeygi\UserPermission\userPermissionServiceProvider::class, // <-- add this line at the end of provider array ],
STEP 3 :, (*6)
php artisan vendor:publish --tag=userPermissionPackage_ilbeygi_ir
STEP 4 :, (*7)
php artisan migrate
STEP 5 : add middleware in app/Http/Kernel.php, (*8)
protected $routeMiddleware = [
....
'checkRoles' => \Ilbeygi\UserPermission\Middlewares\CheckRole::class, // <-- add this line at the end of $routeMiddleware
];
STEP 6 : run laravel, (*9)
php artisan serve
STEP 7 : Go to this way (just for once and you must be logged in), (*10)
http://{your_laravel_address}/saveAllRouteNameInDatabase
STEP 8 :
Go to vendor/ilbeygi/userpermission/src/route.php and delete /saveAllRouteNameInDatabase route :, (*11)
Route::get('/saveAllRouteNameInDatabase', function (){
......
});
SETP 9 : go to this route and see permission panel, (*12)
http://{your_laravel_address}/panel/permissions
full persian document here : http://vrgl.ir/A8P1s Hope to be useful to you, (*13)