hulsia/filament-extra
Composer 安装命令:
composer require hulsia/filament-extra
包简介
A set of reusable Filament helpers, columns, fields, actions and more!
README 文档
README
A set of reusable Filament helpers, columns, fields, actions and more!
Installation
You can install the package via composer:
composer require saade/filament-extra
Forms
Relation Manager
This field lets you render a Relation Manager inside a form. It's useful if you need to render it inside a tab or a modal.
use Saade\FilamentExtra\Forms\Components\RelationManager; use App\Filament\Resources\YourResource\RelationManagers\YourRelationManager; RelationManager::make(YourRelationManager::class) ->lazy(bool $lazy = true)
ColorSelect
This field lets you pick a Filament color from your application.
use Saade\FilamentExtra\Forms\Components\ColorSelect; ColorSelect::make('color')
Concerns
trait HasSoftDeletedRecords
Tired of overriding the getEloquentQuery method in every resource? This trait will handle soft deletes for you.
use Filament\Resources\Resource; use Saade\FilamentExtra\Concerns\HasSoftDeletedRecords; class YourResource extends Resource { use HasSoftDeletedRecords; }
trait NavigationGroupAwareBreadcrumbs
This trait will handle breadcrumbs for you. It's useful if you need to render breadcrumbs for a resource that belongs to a navigation group.
use Filament\Resources\Pages\CreateRecord; use Saade\FilamentExtra\Concerns\NavigationGroupAwareBreadcrumbs; class CreateYourRecord extends CreateRecord { use NavigationGroupAwareBreadcrumbs; }
trait HasParentResource
This trait will handle nested resources for you. Read the blog post if you want to know more. This code was partially taken from LaravelDaily/filament-nested-resources and contributed back to the community.
- Add the
$parentResourceproperty to your child resource.
use Filament\Resources\Resource; class ChildResource extends Resource { public static ?string $parentResource = ParentResource::class; }
- Add the child resource pages to the parent resource.
use Filament\Resources\Resource; class ParentResource extends Resource { public static function getPages(): array { return [ 'index' => Pages\ManageParents::route('/'), 'edit' => Pages\EditParent::route('/{record}/edit'), // Please note that 'child' can be anything you want. It defaults to the resource slug. // If you want to change it, you need to override the $pageNamePrefix property on the child resource pages. 'child.index' => ChildResource\Pages\ListChildren::route('/{parent}/children'), 'child.create' => ChildResource\Pages\CreateChild::route('{parent}/children/create'), 'child.edit' => ChildResource\Pages\EditChild::route('{parent}/children/{record}/edit'), ]; } }
- Add the trait to your child resource pages.
use Filament\Resources\Pages\ListRecords; use Saade\FilamentExtra\Concerns\HasParentResource; class ListChildren extends ListRecords { use HasParentResource; // (optional) Define custom relationship key (if it does not match the table name pattern). protected ?string $relationshipKey = 'parent_id'; // (optional) Define custom child page name prefix for child pages (if it does not match the parent resource slug). protected ?string $pageNamePrefix = 'child'; }
Support
class Color
This class helps you interact with Filament colors. It's useful if you need to convert a color to a hex value, pick a shade to collect() Filament colors.
use Saade\FilamentExtra\Support\Color; Color::make(name: 'fuchia', shade: 200) ->shade(int $shade = 500) // Set a shade ->get() // Returns the color as array of shades ->toHex() // Returns the color as hex value ->toRgb() // Returns the color as rgb value ->collect() // Returns the color as a Laravel Collection
function color
This function is a shortcut to the Color class.
use function Saade\FilamentExtra\Support\color; color(name: 'fuchia', shade: 200) ->shade(int $shade = 500) // Set a shade ->get() // Returns the color as array of shades ->toHex() // Returns the color as hex value ->toRgb() // Returns the color as rgb value ->collect() // Returns the color as a Laravel Collection
function html
Use this function as a shortcut to the Illuminate\Support\HtmlString class.
use Filament\Forms; use function Saade\FilamentExtra\Support\html; Filament\Forms\Components\SomeField::make() ->label( html('<span class="text-red-500">*</span> Label') )
function md
Use this function as a shortcut to the Illuminate\Support\HtmlString class to convert markdown to HtmlString.
use Filament\Forms; use function Saade\FilamentExtra\Support\md; Filament\Forms\Components\SomeField::make() ->label( md('### Label') )
function blade
Use this function to render blade templates.
use Filament\Forms; use function Saade\FilamentExtra\Support\blade; Filament\Forms\Components\SomeField::make() ->label( blade('<x-heroicon::some-icon class="w-5 h-5" /> Label', ['some' => 'data']) )
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
- Saade
- LaravelDaily For the nested resource implementation.
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
hulsia/filament-extra 适用场景与选型建议
hulsia/filament-extra 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.11k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 07 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「saade」 「filament-extra」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hulsia/filament-extra 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hulsia/filament-extra 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hulsia/filament-extra 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Filament package to adjacency lists.
A Set of Filament Component Addons with different designs and extra functionalities
A small package for adding UUIDs to Eloquent models.
Async, high availability brazilian CEP finder with multiple providers for redundancy.
This is my package filament-timeline
This is my package z-api-php-sdk
统计信息
- 总下载量: 1.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-07