Role handling for Laravel

1.2.1 2021-02-02 14:08 UTC

This package is auto-updated.

Last update: 2022-05-29 01:57:34 UTC


Associate users with roles

Header Image

tests badge version badge downloads badge

This package allows you to manage and assign user roles.

Support us

We invest a lot in creating open source packages, and would be grateful for a sponsor if you make money from your product that uses them.


This package can be used in Laravel 6.0 or higher.

You can install the package via composer:

composer require macsidigital/laravel-roles

You can either publish the migration and config files separatly or use our helpful install command

The install function

php artisan roles:install

You must publish the migration with:

php artisan vendor:publish --tag="roles-migrations"

After the migration has been published you can create the db tables by running the migrations:

php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="roles-config"


Once installed you can do stuff like this:




Every guard will have its own set of roles that can be assigned to the guard's users.


composer test


[] Build out some proper documentation


Please see CHANGELOG for more information what has changed recently.


Please see CONTRIBUTING for details.


If you discover any security-related issues, please email instead of using the issue tracker.



The MIT License (MIT). Please see License File for more information.