Download the PHP package shafiulnaeem/multi-auth-role-permission without Composer
On this page you can find all versions of the php package shafiulnaeem/multi-auth-role-permission. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shafiulnaeem/multi-auth-role-permission
More information about shafiulnaeem/multi-auth-role-permission
Files in shafiulnaeem/multi-auth-role-permission
Package multi-auth-role-permission
Short Description Multi auth role permission where user easily assign role permission
License MIT
Homepage https://github.com/ShafiulNaeem/multi-auth-role-permission
Informations about the package multi-auth-role-permission
multi-auth-role-permission
Table of Contents
- Description
- Installation
Description
Multi-Auth Role Permission is a versatile Laravel package designed to create a robust and flexible access control system. This package enables you to define user roles with specific permissions and allows users to customize their permissions beyond their assigned roles. It's a user-friendly solution to enhance the security and control of your Laravel project.
Installation
👉 To install this package, you'll need to have Laravel version 9 or higher and PHP version 8.0.0 or higher installed on your machine. You can download the latest version of PHP from the official PHP resource: https://www.php.net/downloads.php. Ensure your environment meets these requirements before proceeding with the installation.
- Install auth package in laravel project (JWT, laravel/ui etc).
-
Install package:
- Run migrate command:
-
Add auth guards:
-
After add auth guard, hit get api for guard list.
GET
http://localhost:8000/guards or use bellow routeResonse:
-
Follow bellow route middleware pattern for permissions. User must be login for access the routes.
-
Suppose you have two like and . Then you can use bellow route pattern for permission.
-
For admin.
- For customer
-
-
For guard wise route permission list use bellow route.
-
Role CRUD route
-
user permission list from bellow route
-
Assaign user permission using bellow route
- For user role use
userRole($guard_name, $user_id)
function .