Weave Code
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

View on GitHub
Deep Wiki
Context7

A phone input component that uses intl-tel-input for Laravel Filament

Frequently asked questions about Filament Phone Input
How do I install this package in a Laravel Filament 3.x project?
Run `composer require ysfkaya/filament-phone-input` and publish the package’s assets with `php artisan vendor:publish --tag=filament-phone-input-assets`. Ensure your project meets the requirements: PHP 8.1+, Filament 3.x, and Laravel Phone v10+.
Does this package support custom country restrictions or validation rules?
Yes, you can restrict countries using the `allowedCountries()` method or enforce validation rules via `rules()` in your Filament form. The package also supports custom options for the underlying `intl-tel-input` library through `customOptions()`.
Will this work with my existing phone numbers stored in non-E.164 format (e.g., '555-123-4567')?
The package includes lenient validation modes and a `defaultCountry` setting to handle legacy formats. However, you may need to migrate data to E.164 format (e.g., `+15551234567`) for consistency. Test with your dataset before full deployment.
Is GeoIP lookup required, and how can I disable it for air-gapped environments?
GeoIP lookup is enabled by default but can be disabled entirely with `disableLookup()`. This reduces latency and avoids dependency on external services, making it ideal for private networks or offline systems.
What happens if a user submits an invalid phone number without a country code?
Client-side validation will flag incomplete numbers, but server-side validation (via Laravel Phone) is mandatory. Use `defaultCountry()` or `lenient()` to handle edge cases, or implement fallback logic for existing database records.
How does this package impact performance, especially for mobile users?
The package includes the `intl-tel-input` library (~200KB gzipped), which may slow initial load times. For critical pages, consider lazy-loading the component or splitting assets. Disable GeoIP and unused features to optimize bundle size.
Can I use this with Filament’s API resources or only in admin panels?
The package is designed for Filament’s form, table, and infolist components, so it works seamlessly in admin panels. For API resources, use Laravel Phone’s validation rules directly in your request validation logic.
Are there alternatives if I need lighter-weight phone input without intl-tel-input?
For simpler use cases, consider vanilla JavaScript libraries like `libphonenumber-js` or Laravel’s built-in validation without frontend components. However, this package provides the most robust Filament-native solution with server-side integration.
How do I handle multi-language phone number formatting (e.g., Arabic, Hindi)?
The package supports locale-based formatting via `locale()` and integrates with Laravel’s localization system. Test with your target languages, as some regions (e.g., India) may require custom rules for national formats.
What maintenance or update risks should I be aware of if using this package?
Breaking changes may occur if `intl-tel-input` or Laravel Phone introduce updates. Monitor the GitHub repo for announcements. The package author hasn’t confirmed Filament 4.x support yet, so plan for potential migration efforts.
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky