Giter Club home page Giter Club logo

laravel-roles-permissions-bouncer's Introduction

Laravel Roles Permissions Admin - Bouncer version

Update October 2019: this project was created in 2017 as Laravel 5.4 version, and now we upgraded it to Laravel 6 version, also changed the design theme from AdminLTE to CoreUI


This is a Laravel 6 adminpanel starter project with roles-permissions management based on Joseph Silber's Bouncer package, CoreUI theme and Datatables.net.

We've also created almost identical project based on Spatie's Laravel-permission package: see here

Part of this project was generated automatically by QuickAdminPanel system.

Laravel roles permissions screenshot

Laravel roles permissions screenshot 02

Usage

This is not a package - it's a full Laravel project that you should use as a starter boilerplate, and then add your own custom functionality.

  • Clone the repository with git clone
  • Copy .env.example file to .env and edit database credentials there
  • Run composer install
  • Run php artisan key:generate
  • Run php artisan migrate --seed (it has some seeded data - see below)
  • That's it: launch the main URL and login with default credentials [email protected] - password

This boilerplate has one role (administrator), one ability (users_manage) and one administrator user.

With that user you can create more roles/abilities/users, and then use them in your code, by using functionality like Gate or @can, as in default Laravel, or with help of Bouncer's package methods.

License

The MIT license.

Notice

We are not responsible for any functionality or bugs in CoreUI, Bouncer or Datatables packages or their future versions, if you find bugs there - please contact vendors directly.


More from our LaravelDaily Team

laravel-roles-permissions-bouncer's People

Contributors

ben52 avatar laraveldaily avatar marius-k avatar povilaskorop avatar vishalinfyom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-roles-permissions-bouncer's Issues

Where do I edit the translation ( trans() ) keys?

For example if I want to edit the <title>{{ trans('panel.site_title') }}</title> to output not "Permissions Bouncer" but something else? Where do I edit it? Also if I want to use a trans('global.login_username') instead of trans('global.login_email') ?

Is require to create separate table for client and their members?

First thanks for your wonderful example. It reduce to spending lot of time to work on Role based authentication.

I'm working in a project with Client and their members. Based on your example we can create Multiple Role like Admin,Client, Member, etc ... We can restrict the client don't see the Admin details and Member don't see the Admin and client details. So Admin can control all Client and members, client can control all members. Here is my problem.

I want to make a Client can view and control their members only. Not interact with other Client members. It's like a Group. So a Client have a group. He can control their group members only.

I have an idea to make that, While a Client create a user, we can get the id of the client and store it in a db column. So we can use a query to fetch the all users respect to their clients. But is it secure ? or I want to make separate table to hold the relationship like 'client_id, user_id,created_at,updated_at' ?

Please give me some suggestions ?

Post optimize script fails on composer update

Hello,
not exactly a problem with your package but with Bouncer, but I thought it might help others.

What I am trying to do: Install a clean laravel-roles-permissions-bouncer

What I do:
I follow all the outlined steps for installation, which finishes with no errors. Then I want to update the packages, so I issue composer update

What I get:

Error Declaration of Silber\Bouncer\Database\HasRolesAndAbilities::isNot($role) should be compatible with Illuminate\Database\Eloquent\Model::isNot(Illuminate\Database\Eloquent\Model $model)

This seems due to an incompatibility between Bouncer and Laravel versions 5.4.x with x at least 31 and up (it seems), as noted in this issue

(Temporary) Solution: either change composer.json line from
"silber/bouncer": "v1.0.0-beta.2"
to
"silber/bouncer": "v1.0.0-beta.3"

OR

change composer.json line from
"laravel/framework": "5.4.*",
to
"laravel/framework": "5.4.28",

MethodNotAllowedHttpException on users_mass_destroy

I've done some minor modifications to AdminLTE (including applying a purchased admin template rather than AdminLTE) and now I am unable to mass-delete users. Instead, I receive a MethodNotAllowedHttpException in RouteCollection.php (line 251). What pieces need to be in place so that mass delete button will work?

Also, please forgive me for being a complete newbie to AdminLTE and Bouncer, as well as a still-learning rookie with Laravel.

ErrorException

New Install.
Run php artisan migrate --seed
I get ErrorException
[ErrorException] compact(): Undefined variable: operator

Parmission Edit error????

If we have edit permission name after assign to a user then i got error because you directly check permission name on view like @can('users_manage') it is not dynamic method

i'm noob in laravel sorry for if i missing some thing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.