encoredigitalgroup/filament-helpers
Composer 安装命令:
composer require encoredigitalgroup/filament-helpers
包简介
A collection of pre-built Filament components with common configurations that we find ourselves frequently using.
README 文档
README
The Encore Digital Group Filament Helpers package is a collection of pre-built Filament components that we find ourselves frequently using. Rather than constantly rebuilding the same component across multiple resources and projects, we centralized these common configurations into a single shared package. Each helper class method returns a pre-configured Filament component that can be used in your resource classes. Because the helper classes return a Filament component, you can chain additional method calls to further configure the component as needed.
Installation
To install the Filament Helpers package, you can use Composer:
composer require encoredigitalgroup/filament-helpers
Preparing for Filament v4
Preliminary Filament v4 support has been added to this package on the main branch. You can opt-in to using v4 by setting the package version to ^4.0.0-rc1.
Usage of release candidates in production code is discouraged.
Upgrading to v4
- Return types have been updated to use the new
Filament\Schemasnamespace. - Class parameters named
$fieldNamehave been renamed to$fieldfor consistency with the rest of the package. If you are not using named parameters in your code, then there is nothing for you to do.
Upgrading to v3
The EncoreDigitalGroup\Filament\Helpers\Forms\GroupSection class had the following modifications:
The
make()method now only has one parameter:$schema. No changes are required for use of this parameter.- The
$renderparameter has been removed. Use ofmake($schema)automatically renders the component. - The
$fluentparameter has been removed. UseGroupSection::fluent($schema)instead. - The
$innerColumnsparameter has been removed. UseGroupSection::fluent($schema)->innerColumns($int)instead. - The
$outerColumnsparameter has been removed. UseGroupSection::fluent($schema)->outerColumns($int)instead. - The
$innerColumnSpanparameter has been removed. UseGroupSection::fluent($schema)->innerColumnSpan($int)instead. - The
$outerColumnSpanparameter has been removed. UseGroupSection::fluent($schema)->outerColumnSpan($int)instead.
- The
The
fluent()method has been added:- As the name suggests, this method does not automatically render the component. You can make your adjustments using the
provided methods. Once you are finished making adjustments, you can call
render()to render the component.
- As the name suggests, this method does not automatically render the component. You can make your adjustments using the
provided methods. Once you are finished making adjustments, you can call
Upgrading to v2
The only change between v1 and v2 is a slight namespace change. v1 used EncoreDigitalGroup\FilamentHelpers. v2 now uses EncoreDigitalGroup\Filament\Helpers. This
change was made to make this package consistent with other packages Encore Digital Group has. A simple find and replace will work for this upgrade as there are no other
changes, breaking or otherwise, in this release.
Usage
DateTimePicker::make('start_date');
HourSelector::make('start_time', 'Start Time');
NumericScale::make('rating', 'Rating');
PercentScale::make('discount', 'Discount');
TextInput::make('first_name', 'First Name')
DateTimePicker
This helper takes two arguments:
- field: the model attribute to bind the field to.
- required: is the field required? (default: true)
HourSelector
This helper takes two arguments:
- field: the model attribute to bind the field to.
- label: the field label. (default: null)
NumericScale
This helper takes two arguments:
- field: the model attribute to bind the field to.
- label: the field label. (default: null)
PercentScale
This helper takes two arguments:
- field: the model attribute to bind the field to.
- label: the field label. (default: null)
TextInput
This helper takes two arguments:
- field: the model attribute to bind the field to.
- label: the field label. (default: null)
encoredigitalgroup/filament-helpers 适用场景与选型建议
encoredigitalgroup/filament-helpers 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.89k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 05 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 encoredigitalgroup/filament-helpers 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 encoredigitalgroup/filament-helpers 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2024-05-21