net-code / laravel-access
Reusable RBAC authorization for Laravel: roles as data, permissions as code, scoped assignments — hexagonal ports & adapters.
Package info
github.com/Net-Tech-Marek-Rode-Sp-z-o-o/laravel-access
pkg:composer/net-code/laravel-access
v0.3.1
2026-07-12 16:30 UTC
Requires
- php: ^8.5
- illuminate/contracts: ^13.0
- illuminate/database: ^13.0
- illuminate/http: ^13.0
- illuminate/routing: ^13.0
- illuminate/support: ^13.0
- net-code/laravel-bus: ^0.1.0
- net-code/laravel-domain: ^0.1.0
- net-code/laravel-kit: ^0.3.0
- spatie/laravel-data: ^4.23
Requires (Dev)
- larastan/larastan: ^3.10
- laravel/pint: ^1.27
- orchestra/testbench: ^11.0
- phpunit/phpunit: ^13.2
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