PHPackages                             mlsolutions/nova-phone-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mlsolutions/nova-phone-field

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mlsolutions/nova-phone-field
============================

Nova Phone Number field with a dynamic mask based on the country code inserted by the user.

v1.0.2(9mo ago)0191.6k↑37.2%MITVuePHP ^8.3

Since Jun 17Pushed 9mo agoCompare

[ Source](https://github.com/ml-solutions-ltda/nova-phone-field)[ Packagist](https://packagist.org/packages/mlsolutions/nova-phone-field)[ Docs](https://github.com/MlSolutions/nova-phone-field)[ RSS](/packages/mlsolutions-nova-phone-field/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

A global Phone Number field for Laravel Nova
============================================

[](#a-global-phone-number-field-for-laravel-nova)

[![Latest Version](https://camo.githubusercontent.com/a1316fe86e38725607f7b9f4d1fb08d8962590f9c26c8e8e598e3bc7e3591362/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d6c2d736f6c7574696f6e732d6c7464612f6e6f76612d70686f6e652d6669656c643f7374796c653d666c61742d737175617265)](https://github.com/ml-solutions-ltda/nova-phone-field/releases)[![Total Downloads](https://camo.githubusercontent.com/93285efcc24cf70a3cc6e0eb6944bdd03c5f6313f9b9ecb0fb0d5e97137ea252/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6c736f6c7574696f6e732f6e6f76612d70686f6e652d6669656c643f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mlsolutions/nova-phone-field)

Nova Phone Number field with a dynamic mask based on the country code inserted by the user.

Fork from [bissolli/nova-phone-field](https://github.com/bissolli/nova-phone-field) to maintain package.

[![screenshot of the phone field](https://raw.githubusercontent.com/MlSolutions/nova-phone-field/main/screenshot.gif)](https://raw.githubusercontent.com/MlSolutions/nova-phone-field/main/screenshot.gif)

Requirements
------------

[](#requirements)

- PHP **8.3+**
- Laravel Nova **5.0+**
- Laravel Framework **11.0+**

**NOTE**: For Laravel version &lt; 8.0 or Nova &lt; 4 use [bissolli/nova-phone-field](https://github.com/bissolli/nova-phone-field).

Installation
------------

[](#installation)

You can install this package into a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require mlsolutions/nova-phone-field
```

Usage
-----

[](#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

[](#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

[](#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
------------------

[](#migrate-from-10x)

In 2.0 values are now stored in [E.164 format](https://en.wikipedia.org/wiki/E.164). 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](https://www.npmjs.com/package/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
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you've found a bug regarding security please mail  instead of using the issue tracker.

Credits
-------

[](#credits)

- [James Hemery](https://github.com/jameshemery)
- [Gustavo Bissolli](https://github.com/bissolli)
- Special thanks to [Robin Herbots](https://github.com/RobinHerbots) who built one of the best [InputMask](https://github.com/RobinHerbots/Inputmask) from the internet.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance55

Moderate activity, may be stable

Popularity34

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Total

3

Last Release

299d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b895f8c44bd74d8ad19241803acb2f5763db593c608314de8ec07700e79796eb?d=identicon)[luissobrinho](/maintainers/luissobrinho)

---

Top Contributors

[![JamesHemery](https://avatars.githubusercontent.com/u/23323941?v=4)](https://github.com/JamesHemery "JamesHemery (33 commits)")[![luissobrinho](https://avatars.githubusercontent.com/u/17295212?v=4)](https://github.com/luissobrinho "luissobrinho (4 commits)")

---

Tags

laravelnovainput maskphone maskml-solutions-ltda

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mlsolutions-nova-phone-field/health.svg)

```
[![Health](https://phpackages.com/badges/mlsolutions-nova-phone-field/health.svg)](https://phpackages.com/packages/mlsolutions-nova-phone-field)
```

###  Alternatives

[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2872.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2861.8M9](/packages/outl1ne-nova-sortable)[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

14720.0k](/packages/markwalet-nova-modal-response)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
