Simple Role-Based Permission for Laravel 5, Inspired by Laravel Router

v0.1 2017-02-07 07:46 UTC

This package is not auto-updated.

Last update: 2020-05-29 19:33:06 UTC


Simple Role-Based Permissions for Laravel 5, Inspired by Laravel Router

Latest Stable Version Build Status Total Downloads License


Bisa is a simple role-based permissions for Laravel that's so simple it won't need to modify your database at all. It's Zizaco/Entrust big fans, just simpler.


First, install through composer:

composer require imam/bisa

Second, add Bisa service provider and facades to config/app.php:

'providers' => [
'aliases' => [
    'Bisa' => Imam\Bisa\BisaFacade::class,
    'Role' => Imam\Bisa\RoleFacade::class,

Third, publish configuration:

php artisan vendor:publish

Fourth, make sure your user model have role attribute (You can add to User model a one-to-one relationship too). If you want to use other attribute to access instead you can modify user_role_attribute on bisa.php configuration file.

Done! Simple right? :)

Role and Permission

Now, you can create a new file in App folder named Role.php. We will use this as a role and permission management file.


namespace App;

class Role{

    public function init(){

To create a new role, it's as simple as write this in init() function above:


To attach permission(s) to the role:



Checking for roles and permissions

For now, Bisa only have one function to checking roles and permissions.


It will retrieve the current authenticated user and check the role through the role attribute on your user model. If you want to check another user instead pass a user model to the second parameter.


Contact me

Imam Assidiqqi