PHPackages                             yieldstudio/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. yieldstudio/nova-phone-field

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

yieldstudio/nova-phone-field
============================

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

2.0.0(2y ago)6279.9k↑15.9%8[2 issues](https://github.com/YieldStudio/nova-phone-field/issues)[1 PRs](https://github.com/YieldStudio/nova-phone-field/pulls)MITVuePHP ^8.0

Since Jun 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/YieldStudio/nova-phone-field)[ Packagist](https://packagist.org/packages/yieldstudio/nova-phone-field)[ Docs](https://github.com/YieldStudio/nova-phone-field)[ RSS](/packages/yieldstudio-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/0e0fe891098059c43b7e0d7191c93d02ffd43de8a2d2f350a6e63d4241b38215/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7969656c6473747564696f2f6e6f76612d70686f6e652d6669656c643f7374796c653d666c61742d737175617265)](https://github.com/yieldstudio/nova-phone-field/releases)[![Total Downloads](https://camo.githubusercontent.com/b9847ab9419db118c3e5a0b2b54008ec645fcad677da1abe5e9cf88fca5721f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7969656c6473747564696f2f6e6f76612d70686f6e652d6669656c643f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yieldstudio/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/YieldStudio/nova-phone-field/main/screenshot.gif)](https://raw.githubusercontent.com/YieldStudio/nova-phone-field/main/screenshot.gif)

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

[](#requirements)

- PHP **8.0+**
- Laravel Nova **4.0+**
- Laravel Framework **8.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 yieldstudio/nova-phone-field
```

Usage
-----

[](#usage)

Go straight to your Nova resource and use `YieldStudio\NovaPhoneField\PhoneNumber` field:

```
namespace App\Nova;

use YieldStudio\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 `yieldstudio/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

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~206 days

Total

3

Last Release

1034d ago

Major Versions

1.0.1 → 2.0.02023-07-19

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelmasknovaphonelaravelnovainput maskphone maskyieldstudio

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/yieldstudio-nova-phone-field/health.svg)](https://phpackages.com/packages/yieldstudio-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)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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