Search by

jobmetric / rolix

majidmohammadian

An advanced role and membership system for Laravel — built for large-scale, multi-tenant, and modular applications. It provides a robust solution for managing roles, permissions, and user memberships across various modules.

Package info

github.com/jobmetric/rolix

Homepage

Forum

pkg:composer/jobmetric/rolix

Fund package maintenance!

majidmohammadian

Statistics

Installs: 13

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

1.3.0 2026-09-22 00:56 UTC

This package is auto-updated.

Last update: 2026-09-22 00:57:02 UTC


README

Contributors Forks Stargazers MIT License LinkedIn

Rolix

Roles, Memberships, and Permissions for Laravel. Built for Scale.

Rolix is an advanced role and membership system for Laravel applications. Stop wiring ad-hoc permission checks across modules and start managing hierarchical roles, scoped memberships, file-based permissions, and runtime rule evaluators in one consistent package. It is designed for large-scale, multi-tenant, and modular applications—where access control must stay fast, auditable, and extensible.

Why Rolix?

Hierarchical Roles & Scoped Memberships

Define role trees per type, assign people to system-wide or memberable contexts, and evaluate permissions with allow/deny lists, wildcards, owner shortcuts, and super roles.

File-Based Permission Catalog

Register permission definitions from PHP files by context (and optional model scope). Collect paths at boot through domain events so packages and plugins can contribute their own permission files.

Gate, Middleware & Blade Integration

Use Laravel Gate, the rolix.permission middleware, and @rolixCan Blade directive without writing controllers—authorization stays close to your personable models via HasRole and HasMembers.

Rule Evaluators & Activity Log

Attach focused runtime rules (time, weekday, IP, and application environment) to roles, and keep an audit trail of role/membership mutations through the activity logger.

What is Rolix?

Rolix models access as roles, memberships, and permissions:

  • Role — named capability set (allow / deny) with optional hierarchy and rules
  • Membership — links a personable model to a role in a system or memberable context
  • Permission — string keys loaded from files and evaluated with wildcards

Use HasRole on users (or any personable model) and HasMembers on tenants/organizations to assign, sync, and check access. Permission snapshots are memoized per request and optionally stored in Laravel Cache with versioned invalidation.

What Awaits You?

By adopting Rolix, you will:

  • Centralize access control — one package for roles, memberships, and permissions
  • Scale multi-tenant apps — scoped memberships, collections, and owner shortcuts
  • Integrate cleanly — Gate, middleware, Blade, DomainEvent, and EventRegistry
  • Stay auditable — activity logs for role and membership lifecycle events
  • Extend safely — RoleTypeRegistry, RuleEvaluatorRegistry, and permission path events

Quick Start

Install Rolix via Composer:

composer require jobmetric/rolix

Documentation

Ready to build solid access control? Our documentation is the source of truth for Rolix:

📚 Read Full Documentation →

The documentation includes:

  • Getting Started — overview and mental model
  • Installation — composer, config, migrations, and cache settings
  • Showcase — multi-tenant RBAC walkthrough
  • HasRole & HasMembers — traits for personable and memberable models
  • Services — Role, Membership, and PermissionManager APIs
  • Gate / Middleware / Blade — authorization surfaces
  • Events & Activity Log — DomainEvent keys and audit trail
  • Rule Evaluators — built-in drivers and custom evaluators

Contributing

Thank you for participating in rolix. A contribution guide can be found here.

License

The rolix package is open-sourced software licensed under the MIT license. See License File for more information.