momenoor/filament-serial
Composer 安装命令:
composer require momenoor/filament-serial
包简介
A Filament V3 form macro for `TextInput` that allows you to easily format and manage serial numbers with optional prefixes, suffixes, separators, and padded digits.
README 文档
README
A Filament V3 form macro for TextInput that allows you to easily format and manage serial numbers with optional prefixes, suffixes, separators, and padded digits.
✨ Features
- Format serial numbers in Filament forms.
- Support for:
- Prefix and/or suffix
- Custom separator
- Fixed digit zero-padded numeric part
- Automatically formats on blur and focus
- Saves only numeric part to database
- Built-in Alpine.js interactivity
- Simple integration with Filament
TextInput
📦 Installation
You can install the package via Composer:
composer require momenoor/filament-serial
This package auto-registers itself. No need to publish anything.
⚙️ Usage
use Filament\Forms\Components\TextInput; TextInput::make('serial_number') ->label('Serial Number') ->serial( prefix: 'INV', // Optional string or Closure suffix: 'UAE', // Optional string or Closure separator: '-', // Default is "-" length: 6 // Default is 8 );
Example
| Interaction | Value Example |
|---|---|
| On blur | INV-000123-UAE |
| On focus | 123 |
| In database | 000123 |
🛠 Parameters
| Parameter | Type | Description |
|---|---|---|
prefix |
string|Closure | Text before the numeric part |
suffix |
string|Closure | Text after the numeric part |
separator |
string | String between segments (default: -) |
length |
int | Number of digits in the numeric part (default: 8) |
✅ Compatibility
- Laravel 10+
- Filament 3.x
- PHP 8.1+
📄 Changelog
Please see CHANGELOG for more information on recent changes.
🤝 Contributing
Please see CONTRIBUTING for details.
🔐 Security
If you discover any security-related issues, please review the security policy.
🙌 Credits
📜 License
The MIT License (MIT). Please see LICENSE for more information.
momenoor/filament-serial 适用场景与选型建议
momenoor/filament-serial 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 05 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「filament」 「laravel-filament」 「filamentphp」 「Momenoor」 「filament-serial」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 momenoor/filament-serial 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 momenoor/filament-serial 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 momenoor/filament-serial 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Change the default avatar url provider with one for inline SVGs
Spotlight for Filament Admin
A Filament plugin for database-backed application settings and editable content, with caching and easy page generation.
Filament Password Confirmation
Alfabank REST API integration
Spotlight for Filament Admin
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-08