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.
inputNumberFormat) versus national format, and whether to persist the country separately via countryStatePath('phone_country'). That choice affects deduplication, matching against call/SMS vendors, migration effort later, and reporting by region. Getting this wrong is expensive to unwind, so the component is a forcing function for a decision we'd otherwise defer.validateFor(country, type, lenient) lets us encode business rules — e.g. mobile-only for SMS-based 2FA markets, fixed-line allowed for B2B account contacts, or a country allowlist for a launch region. This is a product policy question (who can sign up, which regions we serve) that becomes a one-line config rather than custom code.composer require plus asset publish. Good candidate for "buy" — it is UI plumbing, not differentiation.onlyCountries / excludeCountries / countryOrder make region rollout a configuration lever rather than an engineering ticket — a launch in three countries can ship without a code change when we expand.separateDialCode, showFlags(false), countrySearch, autoPlaceholder, useFullscreenPopup, and disableLookup() (geo-IP) are levers to test against support-ticket volume and form abandonment, not architecture. Low-cost experiments.PhoneInput (form), PhoneColumn (table), and PhoneEntry (infolist) share one formatting vocabulary (PhoneInputNumberType::NATIONAL | E164 | INTERNATIONAL | RFC3966), so support agents, exports, and dashboards see numbers identically — a small but real defection-reduction lever.Consider it when:
TextInput plus a regex is cheaper in dependencies.propaganistas/laravel-phone, which brings libphonenumber).filament:assets + filament-phone-input:install) in deploy.Look elsewhere or build thin when:
intl-tel-input.De-risk before committing: confirm Filament 4 status in the changelog, pin the version, and confirm the laravel-phone and intl-tel-input transitive dependencies pass our dependency policy.
One line: A drop-in, MIT-licensed phone number input for our Filament admin panel that handles country selection, formatting, and libphonenumber-grade validation — roughly a week of build we don't do, and a data-format decision we make explicitly now instead of migrating later.
To executives: Low cost, low lock-in. MIT license, no per-seat or usage fee, installs in an afternoon. The value is threefold: (1) fewer bad phone numbers entering the system, which directly reduces failed SMS/OTP and manual cleanup; (2) faster delivery of international support across our admin surfaces; (3) it forces a clean, canonical storage format so our data stays portable to whatever CRM or messaging vendor we pick next. The risk is maintenance, not money — it's a small, single-maintainer project, so we pin the version and treat it as forkable if it stalls. We should decide before we're on Filament 4, since that's the main upgrade constraint.
To engineering: It wraps intl-tel-input on the frontend and propaganistas/laravel-phone on the backend, exposing one component (PhoneInput) plus a PhoneColumn and PhoneEntry for tables and infolists. Integration is composer + two artisan commands to publish assets, then configuration at the field level — inputNumberFormat, displayNumberFormat, defaultCountry, validateFor, and countryStatePath if we split country into its own column. Two things to check in a spike: the Filament 4 compatibility path, and whether we're comfortable owning the transitive dependency chain. Recommend we pin a version, add a translation key per the README's validation note, and avoid deep customization of the underlying markup so a fork stays cheap.
How can I help you explore Laravel packages today?