Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages

Readme

Overview

A custom Laravel Nova field to handle phone numbers. This field automatically formats phone numbers as the user types, supports country-based formatting, and allows international formatting.

US national phone

Installation

Install the package via Composer:

composer require bocanhcam/nova-phone

Usage

Usage

Add the phone field to your Nova resource:

\Bocanhcam\NovaPhone\Phone::make(__('Phone'), 'phone')

Specify the country and display format

By default, the field uses the US as the country and national formatting.

Override the default format like below.

\Bocanhcam\NovaPhone\Phone::make(__('Phone'), 'phone')
    ->country('JP') // Format for Japan
    ->international() // Display as international number

Powered by libphonenumber-js

For more details on libphonenumber-js, check out their documentation.

License

This package is open-sourced software licensed under the MIT license.

Back to Top
Added 1 year ago
Last updated 1 Year Ago
Version v1.0.1
Nova Version ^4.0
Composer
bocanhcam/nova-phone
GitHub stars 0
Packagist downloads 488

Favorites

0 users favorited

Rating

N/A
(out of 5)
★★★★★
★★★★
★★★
★★
0 ratings

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas