Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Phone Input

Filament Phone Input Laravel Package

ysfkaya/filament-phone-input

A Filament 3 form field for international phone numbers, with country code selection, built-in validation, default country support, and configurable display and input formatting. Requires PHP 8.1+ and integrates directly into Filament forms.

View on GitHub
Deep Wiki
Context7

Filament Phone Input is a Filament 3 form field that brings international phone number handling to your admin panels using intl-tel-input. It renders a flag-enabled country selector, formats numbers as you type, and stores values in standardized formats ready for validation and persistence.

Drop it into any Filament resource or form with PhoneInput::make('phone') and you're running in seconds — no custom JavaScript required.

  • Country selector with flags and auto-detected default country
  • Separate country code option for split storage fields
  • Validation via Laravel's phone rule and custom error messages
  • Flexible formatting for display and stored input values
  • Filament 3 ready on PHP ^8.1
Frequently asked questions about Filament Phone Input
What is ysfkaya/filament-phone-input and what does it add to Filament?
It is a Composer package that provides an international phone input component for Laravel Filament 3.x. It ships a form field (PhoneInput), a table column (PhoneColumn) and an infolist entry (PhoneEntry), so phone numbers can be captured, validated and displayed consistently across your panel. Behind the scenes it uses the intl-tel-input JavaScript library on the client and Laravel Phone on the server for parsing, formatting and validation.
How do I install filament-phone-input in a Laravel application?
Install it with Composer using composer require ysfkaya/filament-phone-input. The service provider is auto-discovered, so no manual registration is needed. The frontend assets are published through Filament's own asset pipeline, so you may need to run php artisan filament:assets after installing or upgrading. Your project needs PHP 8.1 or newer and Filament 3.x.
Which PHP, Laravel and Filament versions does filament-phone-input support?
The package requires PHP 8.1 or higher and targets Filament 3.x, which is the standard stack for modern Laravel applications. It extends Filament's form, table and infolist components and relies on Laravel Phone (v10+) for the server-side number handling. Filament 4 support is not part of the current release, so check the repository before planning a panel upgrade.
How do I validate phone numbers with the Filament phone input?
Validation is handled server-side by Laravel Phone, so numbers are parsed and checked against real numbering plans rather than only by the browser. You can attach the package's rules, or standard Laravel Phone rules, to the field and optionally enable strict mode to reject numbers missing a country code. Client-side checks from intl-tel-input give fast feedback, but the server-side rules are what protect your data. If your database already contains numbers without country codes, normalise them or use lenient validation before turning strict mode on.
How do I set a default country or disable the GeoIP lookup?
By default the component tries to guess the visitor's country through a GeoIP lookup, which can be slow or fail on private networks and air-gapped servers. You can pin a starting country with the defaultCountry option, and call disableLookup() when you want no GeoIP request at all. Disabling the lookup is recommended for internal tools and for pages where latency matters.
How do I store the country code in a separate database column?
The component can split the dial code from the national number and write it to a second field using the countryStatePath option, which should point at the matching form field name. That lets you keep a dedicated country column while the main attribute stores the phone number itself. You will need to add the extra column to your table and include it in your model's fillable attributes. If you prefer a single column, store the number in E.164 instead.
How do I change the format used to display phone numbers in tables and infolists?
PhoneColumn and PhoneEntry render numbers using the format you configure, so you can show E.164 (+15551234567), national (555-123-4567) or RFC3966 (tel:+1-555-123-4567) output. The input side has its own format setting, which controls what the user sees while typing. You can also pass a locale so numbers follow regional conventions.
Can I restrict the list of allowed countries or customise intl-tel-input options?
Yes. The component accepts closures for behaviour such as allowed countries and per-field validation rules, so you can tailor it inside a resource without touching package code. The customOptions method passes an array straight through to the underlying intl-tel-input instance, giving you its full option set. That covers cases like limiting the dropdown to a target market or adjusting how the country selector behaves.
Does the intl-tel-input JavaScript bundle hurt page performance?
The underlying intl-tel-input library is fairly heavy, at roughly 200KB gzipped, so it can measurably affect load time on mobile or low-bandwidth connections. Because the assets are registered through Filament, they load with your panel rather than on every page of the site. If initial load matters, keep the component off non-essential screens and measure Largest Contentful Paint before shipping.
Is filament-phone-input maintained, and should I use Laravel Phone directly instead?
The package is a thin, self-contained wrapper around Laravel Phone and intl-tel-input, so you can drop it and use those libraries directly if maintenance ever stalls. Using Laravel Phone alone gives you validation and formatting, but leaves you to build the Filament field, column and asset wiring yourself. Before adopting it, check recent commits and releases, and track whether a Filament 4 compatible version has been published.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator