{"id":26579659,"url":"https://github.com/mimaxuz/role-manager","last_synced_at":"2025-03-23T06:18:27.973Z","repository":{"id":57017141,"uuid":"273423537","full_name":"MIMAXUZ/role-manager","owner":"MIMAXUZ","description":"Simple Laravel roles and permissions for Laravel applications","archived":false,"fork":false,"pushed_at":"2024-08-16T11:16:30.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T05:17:18.362Z","etag":null,"topics":["database","laravel","laravel-package","laravel-passport","laravel-roles","library","package","php","php7","role","sql"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MIMAXUZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-19T06:42:19.000Z","updated_at":"2024-08-16T11:14:35.000Z","dependencies_parsed_at":"2024-08-16T12:44:21.508Z","dependency_job_id":null,"html_url":"https://github.com/MIMAXUZ/role-manager","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"85c7839eb003414d27fe7a11bb71b8d7f5655731"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIMAXUZ%2Frole-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIMAXUZ%2Frole-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIMAXUZ%2Frole-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIMAXUZ%2Frole-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MIMAXUZ","download_url":"https://codeload.github.com/MIMAXUZ/role-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061698,"owners_count":20554626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","laravel","laravel-package","laravel-passport","laravel-roles","library","package","php","php7","role","sql"],"created_at":"2025-03-23T06:18:27.153Z","updated_at":"2025-03-23T06:18:27.960Z","avatar_url":"https://github.com/MIMAXUZ.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Role Manager\nAn easy and flexible Laravel authorization and roles permission management\n\n[![Total Downloads](https://img.shields.io/packagist/dt/mimaxuz/role-manager.svg?style=flat-square)](https://packagist.org/packages/mimaxuz/role-manager)\n\n## About\nIn many projects, you have to work with roles and permissions. Many packages are large and not all features are needed. That’s why I tried to create a small but effective package for projects. This package can be attached to any project. Convenient and efficient. It is very easy to use and can be used after installation.\n\n## Installation\nHowever, if you are not using Homestead, you will need to make sure your server meets the following requirements:\n- PHP \u003e= 7.2.5\n- BCMath PHP Extension\n- Ctype PHP Extension\n- Fileinfo PHP extension\n- JSON PHP Extension\n- Mbstring PHP Extension\n- OpenSSL PHP Extension\n- PDO PHP Extension\n- Tokenizer PHP Extension\n- XML PHP Extension\n\n### Install package via ```composer```\n```\n$ composer require mimaxuz/role-manager\n```\nAfter that, you need to run the migration files:\n```\n$ php artisan migrate\n```\n## How to use package migrations\nThis package includes the following tables. All tables have a relational line, and the relationships are in cascade.\n\n![Database Diagram For Laravel Role Manager packages](http://yaqubov.info/packages/database_diagram_for_roles_and_permissions_laravel.jpg)\n## How to activate package ?\nThis package contains traits and must be activated within the ```App\\Users``` model. To do this, follow the steps below.\n1. Open ```App\\User``` Model and Copy the following codes\n```\n//For importing traits form package\nUse MIMAXUZ\\LRoles\\Traits\\HasPermissions;\n...\n\nclass User extends Authenticatable\n{\n    use Notifiable;\n    //Import The Trait\n    use HasPermissions; \n    ...\n }\n```\n\n### Assign a route to a role\nBesides middleware and other route settings, you can use a `role` key in your route groups to assign a role to your routes.\n\u003cbr\u003e\nYou can use route groups as follows.\n```\n\nRoute::group(['middleware' =\u003e 'role:admin'], function () {\n    //With controller\n    Route::get('/a', 'HomeController@dashboard');\n    //Inside functions\n    Route::get('/admin', function () {\n        return 'Welcome Admin';\n    });\n});\n```\n### How to use roles inside `Blade` ?\nIf you want to use it in `Blade Templates`, use the following.\n```\n @role('admin')\n   Only Admin roles user can access to it\n @endrole\n ```\n \n\n### Conclusion\nThis package may have issuses and bugs. Don't forget to report if an error or problem occurs!\n\n### License\nStandt MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimaxuz%2Frole-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmimaxuz%2Frole-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimaxuz%2Frole-manager/lists"}