omar-haris / filament-timezone-field
一个Laravel Filament组件,允许用户根据地区选择特定的时区,支持多语言。
v1.0.3
2024-03-22 06:33 UTC
Requires
- php: ^8.1
- filament/filament: ^3.0-stable
- illuminate/contracts: ^10.0|^11
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8|^8.0
- orchestra/testbench: ^8.8|^9.0
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
一个Laravel Filament组件,允许用户根据地区选择特定的时区,支持多语言。
要求
- PHP 8.1^
- Filament v3
安装
您可以通过composer安装此包
composer require omar-haris/filament-timezone-field
您可以使用以下命令发布翻译语言文件:
php artisan vendor:publish --tag="filament-timezone-field-translations"
支持的语言
- 阿拉伯语
- 英语
用法
将其添加到filament表单资源
use OmarHaris\FilamentTimezoneField\Forms\Components\Timezone as TimezoneComponent; public static function form(Form $form): Form { return $form ->schema([ // ... TimezoneComponent::make('timezone') ->searchable() ->required(), // ... ]); }
将其添加到filament表格资源
use OmarHaris\FilamentTimezoneField\Tables\Columns\Timezone as TimezoneColumn; public static function form(Form $form): Form { return $form ->columns([ // ... TimezoneColumn::make('timezone') ->sortable() ->toggleable(), // ... ]); }
您可以用作表格过滤器
use OmarHaris\FilamentTimezoneField\Tables\Filters\Timezone as TimezoneFilter; public static function table(Table $table): Table { return $table //... ->filters([ TimezoneFilter::make('timezone'), // ... ]) }
测试
composer test
变更日志
请查看CHANGELOG以获取最近更改的详细信息。
贡献
请查看CONTRIBUTING以获取详细信息。
安全漏洞
请审查我们的安全策略以了解如何报告安全漏洞。
致谢
许可协议
MIT许可(MIT)。请参阅许可文件以获取更多信息。