Download the PHP package budhaspec/rolepermission without Composer
On this page you can find all versions of the php package budhaspec/rolepermission. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download budhaspec/rolepermission
More information about budhaspec/rolepermission
Files in budhaspec/rolepermission
Package rolepermission
Short Description Allow admin to create module/sub module and assign a permissions to user. User can then access module as per the permission assigned to them.
License MIT
Informations about the package rolepermission
Getting started
Please check the official laravel installation guide for server requirements before you start. Official Documentation
About RolePermission
A lightweight and customizable Role & Permission management system tailored for Laravel admin panels—built with no third-party dependencies.
You can define your own modules and sub-modules, create custom roles, and assign specific permissions to those roles.
Once permissions are set, simply assign the role to a user to control access.
Installation
Install the package via Composer:
Run the database migrations (ensure your .env file is configured properly):
Publish the public assets:
Update user model as below.
Start the local development server:
You can now access the server at http://127.0.0.1:8000/
Usage
Middleware & Route Protection
Configure middleware in bootstrap/app.php
Wrap any routes you want protected by roles and permissions inside the role-permission middleware:
Only users with the appropriate role and permission will be able to access the routes inside this group.
Modules
Manage modules and sub-modules from:
This section allows you to define features (modules) and their actions (sub-modules) that need to be permission-controlled.
Roles
Manage roles and assign permissions via:
From here, you can:
- Create and edit roles
- Assign module and sub-module permissions to roles
- Assign roles to users
Permissions Mapping Convention
From the roles section you can manage roles, Assign permissions (module/sub module) to specific role by clicking on 'Assign Permission' button.
You can assign that Role to specific users for given a grant of that module/sub module.