tanthammar/filament-extras
Composer 安装命令:
composer require tanthammar/filament-extras
包简介
Filament macros, pages, fields, columns and other helpers
README 文档
README
In this repository I will add helpers, blade components, fields and columns that I use in my Filament projects. Regard them as a templates for your own apps...
If they get merged into the main Filament repo, they will be removed here!, but then you'll find them there ;)
Might be best to fork this repo so you're in control of changes, or install the dev branch.
I am creating these fields, macros etc to be used in my SaaS, they won't be usable out of the box in your app. Consider them as templates and make them your own.
Screenshots
AddressSection
Disabled field
Todo field
Documentation
There won't be much documentation written, this repository will grow as I add items. Hopefully the source code contains enough hints to use the components. If not, please post a question in the discussions tab.
Requirements
- PHP 8.0|8.1+
- Laravel v9.0+
- Livewire v2.0+
- Filament v2.0+
Installation
composer require tanthammar/filament-extras
Macros
See FilamentExtrasServiceProvider
saveIfSelfFilled saveIfSelfBlank saveIfSelfValue saveIfSelfNoValue loadAs saveAs updateAs onLoad onUpdate onSave ignored requiredIfBlank requiredIfFilled requiredIfChecked requiredIfUnChecked disabledIfBlank disabledIfFilled disabledIfChecked disabledIfUnChecked nullableIfBlank nullableIfFilled nullableIfChecked nullableIfUnChecked hiddenIfBlank hiddenIfFilled hiddenIfChecked hiddenIfUnChecked visibleIfBlank visibleIfFilled visibleIfChecked visibleIfUnChecked ucwords ucfirst smallcaps uppercase ruleEachInOptions ruleInOptions and many more...
Blade components
See resources/views/components
Example
<x-filament-extras::form submit="submitMethodName" label="Form heading" description="Very nice form component" button="Save"> {{ $this->form }} <x-slot name="buttons"> <!-- optional slot inlined with the save button --> </x-slot> </x-filament-extras::form>
Form Fields
See src/Forms
AddressSection::make(string $jsonColumnName = 'address', string $label = 'Address'); //Address lookup using free OSM service. Consists of AddressSearch + AddressFields AddressSearch::make(string $jsonColumnName = 'address'); //Address search field only, if you want to add your own fields for the Address lookup AddressFields::make(?string $jsonColumnName = null); //The fields that Address search tries to fill Uuid::make(mixed $hiddenOn, string $column = 'uuid'); BusinessName::make(string $column = 'name'); FirstName::make(string $column = 'first_name'); LastName::make(string $column = 'last_name'); Email::make(string $column = 'email', bool $unique = true); Disabled::make(string $name); //Field that carries and displays a value but cannot be edited in frontend, represented with a dashed border HiddenOrSelect::make(bool $condition, string $column, string $label, string|array $rule, array $options ); HiddenOrText::make(bool $condition, string $column, string $label, string|array $rule); JetstreamAuthorSection::make(); LandLine::make(string $column = 'phone', null|int $default = 460, string $label = 'fields.phone');//validates international landline numbers Mobile::make(string $column = 'mobile', null|int $default = 460, string $label = 'fields.mobile'); //validates international mobile numbers Phone::make(string $column = 'phone', null|int $default = 460, string $label = 'fields.phone'); //validates international phone numbers (disregards phone number type) SpatieSlug::make(mixed $hiddenOn, string $column = 'slug'); TranslatableDescription::make(string $column, string $autoFillFrom, string $label); PasswordInput::current(); PasswordInput::create(); PasswordInput::confirmation(); TodoField::make('Create a custom positioning field'), PhoneInput, validators and more...
Table Columns
See src/Tables
DTOColumn::make(string $column, string $attribute); //If you cast your json column into DTO's. Retrieved as $column?->attribute ?? '' JsonColumn::make(string $column, string $dotNotation); //Cast your json column into 'array'. Retreived as data_get($column, $dotNotation, '') PhoneColumn::make(string $column); //Auto-format phone numbers PhoneParseE164Column::make(string $column) //Auto-format E164 phone numbers
tanthammar/filament-extras 适用场景与选型建议
tanthammar/filament-extras 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.09k 次下载、GitHub Stars 达 53, 最近一次更新时间为 2022 年 06 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 tanthammar/filament-extras 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tanthammar/filament-extras 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 5.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 53
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-15



