Download the PHP package ohhink/rrm without Composer
On this page you can find all versions of the php package ohhink/rrm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package rrm
Short Description Laravel RBAC based on Laravel-Permission with backend UI
License MIT
Informations about the package rrm
Laravel Rbac
This Package is used for rules controller which based on roles
This package is based on Laravel Permission and can build a rule controller panel with UI in few minutes.
Server Requirements:
- Php >= 7.2
- Laravel Version >= 6.1 && < 7.0 (Not Support for Laravel Version >= 7.0 , will update soon)
what include
- Const
- Why I do this
- Installation
- How to use
- Related Efforts
- Maintainers
- Contributing
- License
Const
The rule in this novel can be regards as route in Laravel
Why I do this
Word is cheap , show me the code !
Laravel Permission is a very good package without UI. So, this package is add UI on the laravel permission package and do some things to make the panel can be built quickly
What Include:
- Rule controller based on Role , you can add more than one roles to a user .
- Add more than one rules to a role .
- Menus can be different as it depends on the rules the user have .
- Write your new rules in the
routes/web.php
and it can be add in the program through one button - Record the operation, you can choose to use job to do it sync/async
- Backend ui panel
- Google Authenticator
Installation
Recommend to use new Laravel Project Remember to open
exec
,shell_exec
,proc*
functions inphp.ini
Update the local configure file .env
Run the command in the root of your new laravel project with composer
Publish the files , which include admin.php
,filesystems.php
,permission.php
and front resource files and database seeds files
Build the database and run the seeder
Give folder right and soft-link
If you want to use Google Authenticator, you have to add this provider and aliases by yourself
That's it !
How to use
-
The default of the backend route is
/admin
, this can be change though theconfig/admin.php
The seeder have already make a super admin user , which account is below -
What's RBAC talk about is , assign one or more rules to a role and assign one or more roles to a user. We can controller rules with a role , which we normally do rather than a detail rule. So , there is few steps you have to do with your business logic
- finish your code and add your routes in the route/web.php like you normally do
- click the Route Reload . For example , we get the new route admin.test
- create or update your translate files in the path resources/vendor/rrm/zh-cn/permission.php
- assign this new route to a role , like admin
- if this new route is a menu function, you should create a new menu and rebuild the menu otherwise the new menu will not display
-
If you want to rewrite the route , you should add below to you route/web.php
In your app/Http/Controllers/IndexController.php file ,you should add below
-
To see the online-user in the right bar , you have to add command in the app/Console.Kernel.php file, like this
And Remember To Add Command In Your Server
-
Since it record every step user did on panel, if you want to do it async, you can change the key val
QUEUE_CONNECTION=sync
in.env
files toQUEUE_CONNECTION=redis
This will make the recorder use jobs to async log the operations which will be faster. Of course you have to add Redis or PRedis package first -
If you want to change 500 page, you can create a resource/views/vendor/rrm/500.blade.php to rewrite that.
-
Listen Queue Command
-
The layout of this package, you can use it though the follow code.
- Use Google Authenticator
Related Efforts
- Laravel Permission - Associate users with permissions and roles
Maintainers
Contributing
Feel free to dive in! Open an issue or submit PRs.
Standard Readme follows the Contributor Covenant Code of Conduct.
License
MIT © OhhInk
All versions of rrm with dependencies
spatie/laravel-permission Version ^3.0
predis/predis Version ^1.1
earnp/laravel-google-authenticator Version dev-master
simplesoftwareio/simple-qrcode Version ^2.0.0