mlsolutions/nova-phone-field
Composer 安装命令:
composer require mlsolutions/nova-phone-field
包简介
Nova Phone Number field with a dynamic mask based on the country code inserted by the user.
README 文档
README
Nova Phone Number field with a dynamic mask based on the country code inserted by the user.
Fork from bissolli/nova-phone-field to maintain package.
Requirements
- PHP 8.3+
- Laravel Nova 5.0+
- Laravel Framework 11.0+
NOTE: For Laravel version < 8.0 or Nova < 4 use bissolli/nova-phone-field.
Installation
You can install this package into a Laravel app that uses Nova via composer:
composer require mlsolutions/nova-phone-field
Usage
Go straight to your Nova resource and use MlSolutions\NovaPhoneField\PhoneNumber field:
namespace App\Nova; use MlSolutions\NovaPhoneField\PhoneNumber; class Member extends Resource { // ... public function fields(Request $request) { return [ // ... PhoneNumber::make('Phone Number'), // ... ]; } }
Now you can view and add tags on the blog posts screen in your Nova app. All tags will be saved in the tags table.
Filtering
By default, every country mask available inside ml-solutions-ltda/nova-phone-field/resources/js/data/phone-masks.json will be loaded and working. However, you can always select the desired countries calling the onlyCountries() method.
PhoneNumber::make('Phone Number') ->onlyCountries('BR', 'US', 'IE'),
Custom number format
You can also add custom phone formats with withCustomFormats().
PhoneNumber::make('Phone Number') ->withCustomFormats('+123 ## #.#', '+123 ## ####.####'),
Or else use only your own phone formats calling for withCustomFormats() among with onlyCustomFormats().
PhoneNumber::make('Phone Number') ->withCustomFormats('+123 ## #.#', '+123 ## ####.####') ->onlyCustomFormats(),
Migrate from 1.0.x
In 2.0 values are now stored in E.164 format. Previously, the formatted value was stored, which later caused problems for usage.
With the E.164 format, you can use the phone number directly. We use libphonenumber-js to format it on the Index and Detail of your resources.
To replace previously saved values you can use this query :
UPDATE _table_ SET _field_=CONCAT('+', REGEXP_REPLACE(_field_, '\\D', ''))
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail contact@ml-solutions-ltda.fr instead of using the issue tracker.
Credits
- James Hemery
- Gustavo Bissolli
- Special thanks to Robin Herbots who built one of the best InputMask from the internet.
License
The MIT License (MIT). Please see License File for more information.
mlsolutions/nova-phone-field 适用场景与选型建议
mlsolutions/nova-phone-field 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 270.83k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「nova」 「laravel」 「input mask」 「phone mask」 「ml-solutions-ltda」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mlsolutions/nova-phone-field 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mlsolutions/nova-phone-field 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mlsolutions/nova-phone-field 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova card that shows you your system information.
A Laravel Nova card.
Yii2 map input widget. Allows you to select geographcal coordinates via a human-friendly inteface.
Widget to add a remaining character counter to text inputs and textareas
A Laravel Nova package for publishable fields
A Laravel Nova package for translatable fields
统计信息
- 总下载量: 270.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-17
