Powerful package for handling roles and permissions in Laravel 5

Last update: Jun 17, 2022

Roles And Permissions For Laravel 5

Powerful package for handling roles and permissions in Laravel 5 (5.1 and also 5.0).

Installation

This package is very easy to set up. There are only couple of steps.

Composer

Pull this package in through Composer (file composer.json).

{
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "bican/roles": "2.1.*"
    }
}

If you are still using Laravel 5.0, you must pull in version 1.7.*.

Run this command inside your terminal.

composer update

Service Provider

Add the package to your application service providers in config/app.php file.

'providers' => [
    
    /*
     * Laravel Framework Service Providers...
     */
    Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
    Illuminate\Auth\AuthServiceProvider::class,
    ...
    
    /**
     * Third Party Service Providers...
     */
    Bican\Roles\RolesServiceProvider::class,

],

Config File And Migrations

Publish the package config file and migrations to your application. Run these commands inside your terminal.

php artisan vendor:publish --provider="Bican\Roles\RolesServiceProvider" --tag=config
php artisan vendor:publish --provider="Bican\Roles\RolesServiceProvider" --tag=migrations

And also run migrations.

php artisan migrate

This uses the default users table which is in Laravel. You should already have the migration file for the users table available and migrated.

HasRoleAndPermission Trait And Contract

Include HasRoleAndPermission trait and also implement HasRoleAndPermission contract inside your User model.

use Bican\Roles\Traits\HasRoleAndPermission;
use Bican\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissionContract;

class User extends Model implements AuthenticatableContract, CanResetPasswordContract, HasRoleAndPermissionContract
{
    use Authenticatable, CanResetPassword, HasRoleAndPermission;

And that's it!

Usage

Creating Roles

use Bican\Roles\Models\Role;

$adminRole = Role::create([
    'name' => 'Admin',
    'slug' => 'admin',
    'description' => '', // optional
    'level' => 1, // optional, set to 1 by default
]);

$moderatorRole = Role::create([
    'name' => 'Forum Moderator',
    'slug' => 'forum.moderator',
]);

Because of Slugable trait, if you make a mistake and for example leave a space in slug parameter, it'll be replaced with a dot automatically, because of str_slug function.

Attaching And Detaching Roles

It's really simple. You fetch a user from database and call attachRole method. There is BelongsToMany relationship between User and Role model.

use App\User;

$user = User::find($id);

$user->attachRole($adminRole); // you can pass whole object, or just an id
$user->detachRole($adminRole); // in case you want to detach role
$user->detachAllRoles(); // in case you want to detach all roles

Checking For Roles

You can now check if the user has required role.

if ($user->is('admin')) { // you can pass an id or slug
    // or alternatively $user->hasRole('admin')
}

You can also do this:

if ($user->isAdmin()) {
    //
}

And of course, there is a way to check for multiple roles:

if ($user->is('admin|moderator')) { 
    /*
    | Or alternatively:
    | $user->is('admin, moderator'), $user->is(['admin', 'moderator']),
    | $user->isOne('admin|moderator'), $user->isOne('admin, moderator'), $user->isOne(['admin', 'moderator'])
    */

    // if user has at least one role
}

if ($user->is('admin|moderator', true)) {
    /*
    | Or alternatively:
    | $user->is('admin, moderator', true), $user->is(['admin', 'moderator'], true),
    | $user->isAll('admin|moderator'), $user->isAll('admin, moderator'), $user->isAll(['admin', 'moderator'])
    */

    // if user has all roles
}

Levels

When you are creating roles, there is optional parameter level. It is set to 1 by default, but you can overwrite it and then you can do something like this:

if ($user->level() > 4) {
    //
}

If user has multiple roles, method level returns the highest one.

Level has also big effect on inheriting permissions. About it later.

Creating Permissions

It's very simple thanks to Permission model.

use Bican\Roles\Models\Permission;

$createUsersPermission = Permission::create([
    'name' => 'Create users',
    'slug' => 'create.users',
    'description' => '', // optional
]);

$deleteUsersPermission = Permission::create([
    'name' => 'Delete users',
    'slug' => 'delete.users',
]);

Attaching And Detaching Permissions

You can attach permissions to a role or directly to a specific user (and of course detach them as well).

use App\User;
use Bican\Roles\Models\Role;

$role = Role::find($roleId);
$role->attachPermission($createUsersPermission); // permission attached to a role

$user = User::find($userId);
$user->attachPermission($deleteUsersPermission); // permission attached to a user
$role->detachPermission($createUsersPermission); // in case you want to detach permission
$role->detachAllPermissions(); // in case you want to detach all permissions

$user->detachPermission($deleteUsersPermission);
$user->detachAllPermissions();

Checking For Permissions

if ($user->can('create.users') { // you can pass an id or slug
    //
}

if ($user->canDeleteUsers()) {
    //
}

You can check for multiple permissions the same way as roles. You can make use of additional methods like canOne, canAll or hasPermission.

Permissions Inheriting

Role with higher level is inheriting permission from roles with lower level.

There is an example of this magic:

You have three roles: user, moderator and admin. User has a permission to read articles, moderator can manage comments and admin can create articles. User has a level 1, moderator level 2 and admin level 3. It means, moderator and administrator has also permission to read articles, but administrator can manage comments as well.

If you don't want permissions inheriting feature in you application, simply ignore level parameter when you're creating roles.

Entity Check

Let's say you have an article and you want to edit it. This article belongs to a user (there is a column user_id in articles table).

use App\Article;
use Bican\Roles\Models\Permission;

$editArticlesPermission = Permission::create([
    'name' => 'Edit articles',
    'slug' => 'edit.articles',
    'model' => 'App\Article',
]);

$user->attachPermission($editArticlesPermission);

$article = Article::find(1);

if ($user->allowed('edit.articles', $article)) { // $user->allowedEditArticles($article)
    //
}

This condition checks if the current user is the owner of article. If not, it will be looking inside user permissions for a row we created before.

if ($user->allowed('edit.articles', $article, false)) { // now owner check is disabled
    //
}

Blade Extensions

There are four Blade extensions. Basically, it is replacement for classic if statements.

@role('admin') // @if(Auth::check() && Auth::user()->is('admin'))
    // user is admin
@endrole

@permission('edit.articles') // @if(Auth::check() && Auth::user()->can('edit.articles'))
    // user can edit articles
@endpermission

@level(2) // @if(Auth::check() && Auth::user()->level() >= 2)
    // user has level 2 or higher
@endlevel

@allowed('edit', $article) // @if(Auth::check() && Auth::user()->allowed('edit', $article))
    // show edit button
@endallowed

@role('admin|moderator', 'all') // @if(Auth::check() && Auth::user()->is('admin|moderator', 'all'))
    // user is admin and also moderator
@else
    // something else
@endrole

Middleware

This package comes with VerifyRole, VerifyPermission and VerifyLevel middleware. You must add them inside your app/Http/Kernel.php file.

/**
 * The application's route middleware.
 *
 * @var array
 */
protected $routeMiddleware = [
    'auth' => \App\Http\Middleware\Authenticate::class,
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
    'role' => \Bican\Roles\Middleware\VerifyRole::class,
    'permission' => \Bican\Roles\Middleware\VerifyPermission::class,
    'level' => \Bican\Roles\Middleware\VerifyLevel::class,
];

Now you can easily protect your routes.

$router->get('/example', [
    'as' => 'example',
    'middleware' => 'role:admin',
    'uses' => '[email protected]',
]);

$router->post('/example', [
    'as' => 'example',
    'middleware' => 'permission:edit.articles',
    'uses' => '[email protected]',
]);

$router->get('/example', [
    'as' => 'example',
    'middleware' => 'level:2', // level >= 2
    'uses' => '[email protected]',
]);

It throws \Bican\Roles\Exceptions\RoleDeniedException, \Bican\Roles\Exceptions\PermissionDeniedException or \Bican\Roles\Exceptions\LevelDeniedException exceptions if it goes wrong.

You can catch these exceptions inside app/Exceptions/Handler.php file and do whatever you want.

/**
 * Render an exception into an HTTP response.
 *
 * @param  \Illuminate\Http\Request  $request
 * @param  \Exception  $e
 * @return \Illuminate\Http\Response
 */
public function render($request, Exception $e)
{
    if ($e instanceof \Bican\Roles\Exceptions\RoleDeniedException) {
        // you can for example flash message, redirect...
        return redirect()->back();
    }

    return parent::render($request, $e);
}

Config File

You can change connection for models, slug separator, models path and there is also a handy pretend feature. Have a look at config file for more information.

More Information

For more information, please have a look at HasRoleAndPermission contract.

License

This package is free software distributed under the terms of the MIT license.

GitHub

https://github.com/romanbican/roles
Comments
  • 1. managing permissions by role

    I'm currently trying to make this work:

    http://image.prntscr.com/image/ac213fa5acc9477f912623f07f2f0576.png

    Using this package to manage the roles.

    However, this doesn't seem to work out for me. So I want to be able to manage the permissions by role. Like Role 'member' needs to have specific perms, but if necessary, I want to be able to add or remove those permissions. I really don't know how I should fix this and I'm stuck at the moment I need to show if the user has the permission enabled or not.

    This is my current code:

    HTML:

    <table class="table">
       <thead>
          <tr>
            <th>Naam</th>
            <th>Beschrijving</th>
            <th>Status</th>
            <th></th>
          </tr>
        </thead>
        <tbody>
          @foreach($getperms as $perm)
             <tr>
               <td>{{ $perm->name }}</td>
               <td>{{ $perm->description }}</td>
               <td><span class="label label-danger">Not enabled</span></td>
               <td><input type="checkbox" name=""></td>
              </tr>
           @endforeach
          </tbody>
    </table>
    

    And this is my controller:

    /**
         * editUserPerms
         *
         * @return Response
         */
        public function editRolePerms($id)
        {
          $getrole = Role::find($id);
    
          $getperms = Permission::all();
    
          return view('admin.editroleperms')->with('role', $getrole)->with('getperms', $getperms);
        }
    

    If someone could help me out with this, so I'm able to grant or revoke permissions and see if the permission is nabled or not would be awesome.

    Reviewed by RosiersRobin at 2016-09-24 08:53
  • 2. laravel 5.3 Declaration of Illuminate\Database\Eloquent\Model::is() must be compatible with Bican\Roles\Contracts\HasRoleAndPermission::is($role, $all = false)

    while running romanbincan seed

    here is my user model: use Illuminate\Auth\Authenticatable; use Bican\Roles\Traits\HasRoleAndPermission;

    use Bican\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissions; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; use Illuminate\Auth\Passwords\CanResetPassword; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Notifications\Notifiable;

    class User extends Model implements AuthenticatableContract, CanResetPasswordContract, HasRoleAndPermissions { use Authenticatable, CanResetPassword, HasRoleAndPermission, Notifiable;

    Reviewed by Pa6 at 2016-09-10 17:24
  • 3. Listing user information according to their role.

    I'm trying to list my staff members on a page by role.

    I want to be able to display the user and then their (primary) role. Like this:

    Result

    Now, I have this code in my view:

    @extends('layouts.master')
    
    @section('title', 'Forum team')
    
    @section('content')
    
    <div class="container" id="forum-container">
    
    @foreach($roles as $role)
    <div class="col-md-12">
        <div class="thread-box">
            <div class="thread-title">{{ $role->name }}</div>
    
            @if($role->id)
            <div class="forum-body">
                <div class="forum-user">
                    <div class="user">Username <div class="{{ XenioNode\User::find(2)->isOnline() ? 'online' : 'offline' }}"></div></div>
                    <img src="#" class="img-responsive img-circle" alt="Cinque Terre">
                    <div class="user-status" style="background-color:blue;">Role name</div>
                </div>
    
                <div class="forum-thread-body">
                    <div class="thread-body">
                        <p>The user's bio.</p>
                    </div>
                </div>
            </div>
            @endif
    
        </div>
    </div>
    @endforeach
    
    </div>
    
    @endsection
    

    Then I have this in my controller:

    public function index()
        {
            $GetRoles = DB::table('roles')->where('display', 1)->orderBy('id', 'ASC')->get();
            $GetUsersByRole = DB::table('role_user')->orderBy('id', 'ASC')->get();
    
            return view('team')->with('roles', $GetRoles)->with('userrole', $GetUsersByRole);
        }
    

    So I want the User displayed in the correct field.

    Like Role ID 1 is assigned to User ID 2, then user ID 2 need to be in the place where role id 1 is.

    Hope you understand

    Kindest regards Robin

    Reviewed by RosiersRobin at 2016-04-08 12:07
  • 4. Trait collision on migration

    [Symfony\Component\Debug\Exception\FatalErrorException] Trait method can has not been applied, because there are collisions with other trait methods on App\User 
    

    I spun up a new install of Laravel 5.1.11 which is now using Authorization, and when I run my migration I receive the error above. I commented out all the bican\roles traits and contracts and it allowed me to migrate.

    It looks like the collision is happening between:

    use Bican\Roles\Traits\HasRoleAndPermission;
    

    and

    use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
    

    Seems that the Authorizable interface has a 'can' method as well.

    Authorizable:

        /**
         * Determine if the entity has a given ability.
         *
         * @param  string  $ability
         * @param  array|mixed  $arguments
         * @return bool
         */
        public function can($ability, $arguments = []);
    

    HasRoleAndPermission:

        /**
         * Check if the user has a permission or permissions.
         *
         * @param int|string|array $permission
         * @param bool $all
         * @return bool
         */
        public function can($permission, $all = false)
        {
            if ($this->isPretendEnabled()) {
                return $this->pretend('can');
            }
    
            return $this->{$this->getMethodName('can', $all)}($permission);
        }
    
    Reviewed by ghost at 2015-09-01 03:12
  • 5. RuntimeException when updating from 1.6 to 1.7.1

    [RuntimeException]                                                                                                                                                                                                                     
    Error Output: PHP Fatal error:  Call to undefined method Illuminate\View\Compilers\BladeCompiler::directive() in /home/vagrant/projects/askme2/vendor/bican/roles/src/Bican/Roles/RolesServiceProvider.php on line 46                  
    PHP Stack trace:                                                                                                                                                                                                                       
    PHP   1. {main}() /home/vagrant/projects/askme2/artisan:0                                                                                                                                                                              
    PHP   2. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/projects/askme2/artisan:36                                                                                                                                       
    PHP   3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:92                                                                      
    PHP   4. Illuminate\Foundation\Application->bootstrapWith() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:195                                                                    
    PHP   5. Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:183                                                               
    PHP   6. Illuminate\Foundation\Application->boot() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:15                                                                     
    PHP   7. array_walk() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:686                                                                                                             
    PHP   8. Illuminate\Foundation\Application->Illuminate\Foundation\{closure}() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:686                                                     
    PHP   9. Illuminate\Foundation\Application->bootProvider() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:685                                                                        
    PHP  10. Illuminate\Container\Container->call() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:703                                                                                   
    PHP  11. call_user_func_array:{/home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Container/Container.php:523}() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Container/Container.php:523  
    PHP  12. Bican\Roles\RolesServiceProvider->boot() /home/vagrant/projects/askme2/vendor/laravel/framework/src/Illuminate/Container/Container.php:523                                                                                    
    PHP  13. Bican\Roles\RolesServiceProvider->registerBladeExtensions() /home/vagrant/projects/askme2/vendor/bican/roles/src/Bican/Roles/RolesServiceProvider.php:24     
    

    Could you please check that?

    Kindest regards Christian

    Reviewed by dailez at 2015-05-29 08:03
  • 6. Check if user created the post

    Hi !

    I wanted to know if there was a simple way with this package to check if a user was assigned to an article/profile/whatever? I think it could be done with permissions.

    For example, if the user is on its own profile, is there a way to put a custom message in the blade template? Or something similar if the user is the author of some article on a blog ?

    For the moment I'm checking like this and I'm pretty sure that's not the best way : if(Auth::user()-> id == $event->user_id)

    Thank you very much,

    Reviewed by WillyReyno at 2015-06-05 06:49
  • 7. Banning users and redirect them to a specific page.

    Hi,

    I was wondering, how I could ban people via this package...

    So I'm currently using Laravel 5.1 and I'm trying to 'ban' users from my site. I have a table called 'banned' wich has the following tructure: http://laravel.io/bin/KkKRK

    I also have the standard structure of the roles (bican roles).

    Now, I want to be able to display a custom banned view to my banned users with the data from inside the 'banned' table.

    What would be the best way to do this?

    Reviewed by RosiersRobin at 2016-04-04 11:44
  • 8. user role has no permission but can() return true?

    1、User -- Roles admin(id=1) -- super.admin test(id=2) -- admin

    2、Role -- Permission super.admin -- admin.manage

    but I run: $user = User::find(2); dd($user->can('admin.manage')); it returns true?

    Reviewed by xlkit456852 at 2016-09-13 02:30
  • 9. Laravel 5.2 User model?

    Hi Everyone, i use this package with Laravel 5.2 I added lines in to the User.php

    <?php
    
    namespace App;
    
    use Illuminate\Foundation\Auth\User as Authenticatable;
    use Bican\Roles\Traits\HasRoleAndPermission;
    use Bican\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissionContract;
    
    class User extends Authenticatable implements HasRoleAndPermissionContract
    {
        use HasRoleAndPermission;
    
        protected $fillable = [
            "name", "email", "password",
        ];
    
        protected $hidden = [
            "password", "remember_token",
        ];
    
    }
    
    

    and on controller for if question..

          $user = \App\User::find(Auth::id());
           if ($user->is('admin')) { // you can pass an id or slug
            return redirect('login');
          }
    

    but not running. Where is the error? Thanks

    Reviewed by kzorluoglu at 2016-05-26 19:55
  • 10. GROUP BY error on PostgreSQL

    I'm runnning "bican/roles": "2.1." with "laravel/framework": "5.1." on PostgreSQL and when I use @permission in my templates I get the following error:

    SQLSTATE[42803]: Grouping error: 7 ERROR: column "permission_role.created_at" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: select "permissions"., "permission_role"."created_at" as "p... ^ (SQL: select "permissions"., "permission_role"."created_at" as "pivot_created_at", "permission_role"."updated_at" as "pivot_updated_at" from "permissions" inner join "permission_role" on "permission_role"."permission_id" = "permissions"."id" inner join "roles" on "roles"."id" = "permission_role"."role_id" where 0 = 1 or "roles"."level" < 0 group by "permissions"."id") (View: resources/views/layout.blade.php) (View: resources/views/layout.blade.php)

    The problem is in HasRoleAndPermission.php->rolePermissions() on line 165. The query selects all columns, but on the groupBy part only groups by permission id. I'm not quite sure which of the columns the remaining code needs, but those need to be added into the groupBy expression.

    Reviewed by scmmmh at 2015-07-15 14:08
  • 11. php artisan vendor:publish always copies migrations

    First of all, let me say thanks for this great L5 package. The Blade Extensions are wonderful.

    I noticed that running php artisan vendor:publish always outputs:

    Copied Directory [/vendor/bican/roles/src/migrations] To [/database/migrations]
    

    But looking in the migrations directory it didn't changed anything.

    Reviewed by dciancu at 2015-05-16 11:18
  • 12. Change lists method to pluck as in https://laravel.com/docs/5.3/upgra…

    Hi, I want to make a contribution.

    lists method is deprecated it replace by pluck method (https://laravel.com/docs/5.3/upgrade#upgrade-5.2.0)

    *sorry for my English, and this is my first contribution, so please bear with me :D

    Reviewed by tegaralaga at 2017-09-12 04:50
  • 13. Error (1/1) FatalErrorException Interface

    (1/1) FatalErrorExceptionInterface 'App\AuthenticatableContract' not found

    in User.php (line 10)

    <?php
    
    namespace App;
    
    use Illuminate\Database\Eloquent\Model;
    use Illuminate\Notifications\Notifiable;
    use Bican\Roles\Traits\HasRoleAndPermission;
    use Bican\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissionContract;
    
    class User extends Model implements AuthenticatableContract, CanResetPasswordContract, HasRoleAndPermissionContract
    {
        use Authenticatable, CanResetPassword, HasRoleAndPermission;
        use Notifiable;
    
    
    Reviewed by tolgatasci at 2017-08-02 09:54
  • 14. Use logic operators instead of dual methods

    Instead of using mutable functions (one / all) the best solution is to use logical operators ( & | ). That way we get an extra function mixing both... can do things like that:

    if (Auth::user()->hasRole('admin|employee&manager|employee&advanced')) {
        //do something if:
        //- user is admin
        //- user is an employee manager
        //- user is an employee with advanced role
    }
    

    Like in normal coding, the and operator has priority.

    Removed: getMethodName, getArrayFrom Included: matchOperator, mapOrAnd

    Reviewed by wffranco at 2017-07-11 20:31
This is a lightweight package that allows you assign roles and permissions to any Laravel model, or on a pivot table (many to many relationship).
This is a lightweight package that allows you assign roles and permissions to any Laravel model, or on a pivot table (many to many relationship).

Simple Laravel roles and permissions Introduction This package allows you to assign roles and permissions to any laravel model, or on a pivot table (m

May 25, 2022
Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system.
Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system.

Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system. Built on Bootstrap 4.

Jun 30, 2022
Tech-Admin is Laravel + Bootstrap Admin Panel With User Management And Access Control based on Roles and Permissions.
Tech-Admin is Laravel + Bootstrap Admin Panel With User Management And Access Control based on Roles and Permissions.

Tech-Admin | Laravel 8 + Bootstrap 4 Tech-Admin is Admin Panel With Preset of Roles, Permissions, ACL, User Management, Profile Management. Features M

Jun 18, 2022
Handle roles and permissions in your Laravel application

Laratrust (Laravel Package) Version Compatibility Laravel Laratrust 8.x 6.x 7.x 6.x 6.x 6.x 5.6.x - 5.8.x 5.2 5.3.x - 5.5.x 5.1 5.0.x - 5.2.x 4.0. Ins

Jun 25, 2022
Laravel Roles and Permissions

Introduction to Laravel Roles and Permission App Starter Kit Roles and sanctions are a paramount part of many web applications. In project, we have op

Nov 1, 2021
Roles & Permissions for Laravel 8 / 7 / 6 / 5

Defender Defender is an Access Control List (ACL) Solution for Laravel 5 / 6 / 7 (single auth). (Not compatible with multi-auth) With security and usa

Apr 28, 2022
Laravel Users (Roles & Permissions, Devices, Password Hashing, Password History).
Laravel Users (Roles & Permissions, Devices, Password Hashing, Password History).

LARAVEL USERS Roles & Permissions Devices Password Hashing Password History Documentation You can find the detailed documentation here in Laravel User

Apr 20, 2022
Associate users with roles and permissions
Associate users with roles and permissions

Associate users with permissions and roles Sponsor If you want to quickly add authentication and authorization to Laravel projects, feel free to check

Jul 3, 2022
This package helps you to associate users with permissions and permission groups with laravel framework
This package helps you to associate users with permissions and permission groups with laravel framework

Laravel ACL This package allows you to manage user permissions and groups in a database, and is compatible with Laravel v5.8 or higher. Please check t

Jun 28, 2022
PermissionsMakr is a Laravel package that will help any developer to easily manage the system's users permissions

PermissionsMakr is a Laravel package that will help any developer to easily manage the system's users permissions

Nov 30, 2021
Eloquent roles and abilities.
Eloquent roles and abilities.

Bouncer Bouncer is an elegant, framework-agnostic approach to managing roles and abilities for any app using Eloquent models. Table of Contents Click

Jun 26, 2022
Proyecto para aprender a utilizar privilegios (roles y permisos) con CRUDBooster

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

May 9, 2022
Role-based Permissions for Laravel 5

ENTRUST (Laravel 5 Package) Entrust is a succinct and flexible way to add Role-based Permissions to Laravel 5. If you are looking for the Laravel 4 ve

Jun 22, 2022
Light-weight role-based permissions system for Laravel 6+ built in Auth system.

Kodeine/Laravel-ACL Laravel ACL adds role based permissions to built in Auth System of Laravel 8.0+. ACL middleware protects routes and even crud cont

Jun 17, 2022
Manage authorization with granular role-based permissions in your Laravel Apps.
Manage authorization with granular role-based permissions in your Laravel Apps.

Governor For Laravel Manage authorization with granular role-based permissions in your Laravel apps. Goal Provide a simple method of managing ACL in a

May 30, 2022
Laravel mongodb permissions

Laravel mongodb permissions

May 10, 2022
💝The Plus (ThinkSNS+) is a powerful, easy-to-develop social system built with Laravel.
💝The Plus (ThinkSNS+) is a powerful, easy-to-develop social system built with Laravel.

Plus (ThinkSNS+) Plus (ThinkSNS+) 是使用 Laravel 框架开发;一个功能强大、易于开发和动态拓展的社交系统。Plus 是遵循 PSR 规范 代码统一,并功能块松耦合。你安装完成 Plus 并不意味着已经成功安装了所有功能,因为 Plus 使用 模块化 的 原则,

Jun 30, 2022
A Laravel 5 package for OAuth Social Login/Register implementation using Laravel socialite and (optionally) AdminLTE Laravel package

laravel-social A Laravel 5 package for OAuth Social Login/Register implementation using Laravel socialite and (optionally) AdminLTE Laravel package. I

Apr 13, 2022
Laravel Passport is an OAuth2 server and API authentication package that is simple and enjoyable to use

Introduction Laravel Passport is an OAuth2 server and API authentication package that is simple and enjoyable to use. Official Documentation Documenta

Jun 17, 2022