Skip to content

ilbeygi/userpermission

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

userpermissions

This is a package about permissions of users in laravel


laravel permissions

How to install userPermission package on laravel

Installation

STEP 1 :

composer require "ilbeygi/userpermission":"dev-master"

STEP 2 : Add provider in config/app.php

'providers' => [
  ...
  Ilbeygi\UserPermission\userPermissionServiceProvider::class, // <-- add this line at the end of provider array
],

STEP 3 :

  php artisan vendor:publish --tag=userPermissionPackage_ilbeygi_ir

STEP 4 :

  php artisan migrate

STEP 5 : add middleware in app/Http/Kernel.php

protected $routeMiddleware = [
        ....
        'checkRoles' => \Ilbeygi\UserPermission\Middlewares\CheckRole::class,  // <-- add this line at the end of $routeMiddleware
    ];

STEP 6 : run laravel

  php artisan serve

STEP 7 : Go to this way (just for once and you must be logged in)

  http://{your_laravel_address}/saveAllRouteNameInDatabase

STEP 8 : Go to vendor/ilbeygi/userpermission/src/route.php and delete /saveAllRouteNameInDatabase route :

Route::get('/saveAllRouteNameInDatabase', function (){
    
        ......
    });

SETP 9 : go to this route and see permission panel

 http://{your_laravel_address}/panel/permissions

full persian document here : http://vrgl.ir/A8P1s Hope to be useful to you

About

this is a package about roles of users in laravel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published