tiagolemosneitzke/filamentacl
Composer 安装命令:
composer require tiagolemosneitzke/filamentacl
包简介
A flexible and lightweight Access Control List (ACL) plugin for managing user permissions and roles in Laravel applications
README 文档
README
A flexible and lightweight Access Control List (ACL) plugin for managing user permissions and roles in Laravel applications using Filament.
Attention
This package doesn't work with Tenancy.
You can install the package via composer:
composer require tiagolemosneitzke/filamentacl -W
This will install the Filament ACL package along with its dependencies, including spatie/laravel-permission.
After the installation, publish the migration and configuration files:
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
Run the migrations to create the necessary tables:
php artisan migrate
Add the HasRoles trait to your User model:
use Spatie\Permission\Traits\HasRoles; class User extends Authenticatable { use HasRoles; }
Register the plugin in your Panel provider:
use TiagoLemosNeitzke\FilamentAcl\FilamentAclPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ FilamentAclPlugin::make() ]); }
You can then install the Filament ACL package with the following command:
php artisan filament-acl:install
This will publish the config file.
Alternatively, you can publish only the config file with:
php artisan vendor:publish --tag="filament-acl-config"
This is the contents of the published config file:
return [ 'permission' => [ 'prefixes' => [ 'view', 'view_any', 'create', 'update', 'restore', 'delete', 'force_delete' ] ], 'roles_prefixes' => [ 'admin', ] ];
Also, you can publish manually all the files with:
php artisan vendor:publish --provider="TiagoLemosNeitzke\FilamentAcl\FilamentAclServiceProvider"
Or you can publish the necessary files one by one
php artisan vendor:publish --tag=filament-acl-config php artisan vendor:publish --tag=filament-acl-stubs
You don't need to publish all the files for the package work, but you need to publish the settings file and configuring correctly the Laravel Permissions Package.
In your UserResource file, you should add the below code to edit and view the permission of the user:
use TiagoLemosNeitzke\FilamentAcl\Models\Role; public static function form(Form $form): Form { return $form ->schema([ Forms\Components\Select::make('roles') ->label('Role') ->relationship('roles', 'name') ->options(Role::all()->pluck('name', 'id')) ->multiple() ->preload() ->searchable(), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('roles.name') ->label('Is Admin?') ->badge(), ]); }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
tiagolemosneitzke/filamentacl 适用场景与选型建议
tiagolemosneitzke/filamentacl 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 01 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「acl」 「laravel」 「roles」 「permissions」 「filament」 「filamentacl」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tiagolemosneitzke/filamentacl 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tiagolemosneitzke/filamentacl 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tiagolemosneitzke/filamentacl 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Multiauth package
This package provides a flexible way to add Role-based Permissions to Laravel 6.x
This package provides a flexible way to add Role-based Permissions to Laravel
AclManager plugin for CakePHP 3.x
Alfabank REST API integration
Smile Retailer Admin
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-06