Search by

net-code / laravel-access

mrode-net-tech

Reusable RBAC authorization for Laravel: roles as data, permissions as code, scoped assignments — hexagonal ports & adapters.

v0.3.1 2026-07-12 16:30 UTC

This package is auto-updated.

Last update: 2026-09-12 16:59:54 UTC


README

Reusable RBAC authorization for Laravel — roles as data, permissions as code, optional scopes — built with hexagonal ports & adapters. Authentication (who you are) is a separate concern → net-code/laravel-identity.

composer require net-code/laravel-access
php artisan migrate
$authorizer->can($userId, Permission::InvoicesIssue, $tenantId);   // host enum, typed
Route::post('/invoices', IssueInvoiceController::class)->middleware('permission:invoices.issue');
  • docs/usage.md — install, config, ports, wiring.
  • docs/flows.md — the end-to-end flows.

The core is subject-agnostic (subjectId: string): it never depends on the identity package — the host wires the bridge.

License

MIT