yepsua/filament-range-field
Composer 安装命令:
composer require yepsua/filament-range-field
包简介
The missing range/slider field for the Filament forms.
README 文档
README
Installation
You can install the package via composer:
composer require yepsua/filament-range-field
Publish the assets:
php artisan filament:assets
You must see something like in the console:
php artisan filament:assets ... public/css/yepsua/filament-range-field/range-input-component.css ...
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-range-field-views"
Basic usage
By default the range is used to get value from 0 to 100.
use Yepsua\Filament\Forms\Components\RangeSlider ... protected function getFormSchema(): array { return [ ... RangeSlider::make('range') ... ]; } ...
Defining the steps:
use Yepsua\Filament\Forms\Components\RangeSlider ... protected function getFormSchema(): array { return [ ... RangeSlider::make('range')->steps([ 'A', // should get value: 1 for the A 'B', // should get value: 2 for the B 'C', // should get value: 3 for the C 'D' // should get value: 4 for the D ]) ... ]; } ...
Associative Array:
use Yepsua\Filament\Forms\Components\RangeSlider ... protected function getFormSchema(): array { return [ ... RangeSlider::make('range')->steps([ '25' => 'A', // should get value: 25 for the A '50' => 'B', // should get value: 50 for the B '75' => 'C', // should get value: 75 for the C '100' => 'D' // should get value: 100 for the D ]) ... ]; } ...
Hide the Step List:
use Yepsua\Filament\Forms\Components\RangeSlider ... protected function getFormSchema(): array { return [ ... RangeSlider::make('range')->steps([ 'A', 'B', 'C', 'D' ])->displaySteps(false) ... ]; } ...
📕 Note: The step value is defined by the first item in the steps array, Ex. => [25, 50, 75, 100] the step value should be 25. However if you need to define any other step value you can use the setter step.
RangeSlider::make('range')->steps([ 0 => '0', 25 => '25', 50 => '50', 75 => '75', 100 => '100' ])->step(25) ...
The same case applies for the min and max setters:
RangeSlider::make('range')->min(25)->max(75)->step(5)
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
yepsua/filament-range-field 适用场景与选型建议
yepsua/filament-range-field 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 54.14k 次下载、GitHub Stars 达 36, 最近一次更新时间为 2022 年 05 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「yepsua」 「filament-range-field」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 yepsua/filament-range-field 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yepsua/filament-range-field 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 yepsua/filament-range-field 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Ranting field for the Filament forms
Provides a captcha field for the Filament Forms
The missing range/slider field for the Filament forms.
Alfabank REST API integration
The missing range/slider field for the Filament forms. Updated for Laravel 11.
This Bundle contains a pretty theme layout for Admin Applications. It Was Designed to be used with YepsuaSmarTwigBundle and YepsuaGeneratorBundle.
统计信息
- 总下载量: 54.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 36
- 点击次数: 17
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-05-17



