承接 tanthammar/filament-extras 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

AddressSection

Disabled field

Todo field

image

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

统计信息

  • 总下载量: 5.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 53
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 53
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固