Filament Hexa Lite is an effortless role and permission plugin for Filament. The plugin provides an admin-only UI to manage different user roles and permissions that you can use to control access in your Filmanent app:
This plugin creates a separate admin table to manage roles, including the following features:
Edit roles and permissions as an admin
Define permissions for Resources and pages
Define permissions for Actions
Validate Access permissions
The Hex Lite plugin provides a variety of ways to check access permissions on resources, pages, widgets, etc.:
use IlluminateSupportFacadesGate;
hexa()->can(‘hexa.admin’);
auth()->user()?->can(‘hexa.admin’)
Gate::allows(‘hexa.admin’)
// Blade:
/*
<div>
@can(‘hexa.admin’)
// Content here …
@endcan
</div>
*/
You can learn more about this package, get full installation instructions, and view the source code on GitHub. Check out the readme for setup and usage documentation.
The post Manage Roles and Permissions in Filament with Hex Lite appeared first on Laravel News.
Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.
Source: Read MoreÂ