34ml / filament-price-converter-field
用于 filament 管理面板的价格转换字段
v1.2.1
2024-01-23 09:55 UTC
Requires
- php: ^8.1
- filament/filament: ^2.0 | ^3.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
安装
您可以通过 composer 安装此包
composer require 34ml/filament-price-coverter-field
这是发布配置文件的内容,您可以在其中设置默认货币
return [ 'currency' => 'EUR', ];
用法
在表单功能中,将字段添加到您的资源、视图、创建或编辑页面
use _34ML\FilamentPriceConverterField\FilamentPriceConverterField; FilamentPriceConverterField::make('price')->required(),
如果您想将其用于列表页面的表格中
use _34ML\FilamentPriceConverterField\FilamentPriceConverterColumn; FilamentPriceConverterColumn::make('price')->label('Sale Price'),
鸣谢
许可证
MIT 许可证(MIT)。请参阅许可证文件以获取更多信息。