# romanbican/roles

Powerful package for handling roles and permissions in Laravel 5

Repository: https://github.com/romanbican/roles
Canonical: https://ross.abutalabs.com/products/roles
Language: PHP
License: MIT
License Family: permissive
Archived: true
Last push: 2021-11-25T13:16:07+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4248, "days_push": 1742, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1146, forks 286 (observed 2026-08-28T04:03:45.757517+00:00)

## What it is
A Laravel 5 package for managing user roles and permissions, including role levels, permission inheritance, Blade template extensions, and route middleware. It integrates via a HasRoleAndPermission trait on the User model with database-backed roles and permissions.

## Use cases
- add role-based access control to a Laravel app
- check if a user has a role or permission in Blade templates
- restrict routes with role and permission middleware
- manage admin vs regular user permissions
- implement permission inheritance for hierarchical roles
- assign and detach roles from users in Eloquent

## When to choose
- you are maintaining a legacy Laravel 5.0 or 5.1 application
- you need a simple, proven RBAC package with Blade helpers and middleware
- you want role levels and permission inheritance out of the box

## When to avoid
- you are on Laravel 6 or newer - use actively maintained alternatives like spatie/laravel-permission
- you need multi-guard, teams, or advanced policy features
- you are starting a new project and want long-term support

## Facets
- artifact type: library
- maturity: maintenance
- function: auth, authorization, middleware
- domain: web-development, backend, security, developer-tools
- platform: php, self-hosted
- tags: laravel, roles-and-permissions, rbac, blade-directives, eloquent, web-server

## Member repositories
- romanbican/roles (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:45.757517+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:34:12.079906+00:00, confidence not recorded.
  - readme: https://github.com/romanbican/roles (fetched 2026-08-28T04:03:45.757517+00:00, sha 88b8d0996870)
- Data as of 2026-08-30T08:39:29.467469+00:00.
