TextInput, TextColumn) with phone-specific logic, ensuring consistency with the admin panel’s design system.libphonenumber. Aligns with Laravel’s ecosystem (e.g., validation rules, Eloquent casting).Laravel Phone, reducing custom logic in the TPM’s codebase.customOptions, ipLookup), allowing TPMs to adapt behavior without forking.filament:assets, filament-phone-input:install), with no manual JS/CSS overrides needed.string for phone numbers).validateFor().libphonenumber: Underlying library is robust but may introduce edge cases (e.g., ambiguous numbers, unsupported regions). Mitigate via lenient validation mode.3.x).disableLookup() if unnecessary.intl-tel-input (~100KB JS), but critical for UX. Minimal impact in Filament’s asset pipeline.defaultCountry. Requires data migration or lenient mode.RFC3966) may need manual handling in customOptions.lenient: false) or allow partial matches for legacy data?US)?countryStatePath) or embedded in the phone field?E164, NATIONAL, etc.)?Laravel Phone integration.intl-tel-input: More flexible but requires manual Filament integration.PhoneInput to test UX and validation.defaultCountry and validateFor settings.defaultCountry to existing records).NumberParseException) and adjust lenient mode.TextInput with PhoneInput.TextColumn with PhoneColumn.TextEntry with PhoneEntry.Laravel Phone rules (e.g., phone:us).validation.php (see Laravel Phone docs).string (not integer).phone_country column if using countryStatePath.composer require ysfkaya/filament-phone-input
php artisan filament:assets
php artisan filament-phone-input:install
customOptions or i18n):
php artisan vendor:publish --tag="filament-phone-input-config"
form(), table(), and infolist() methods to use PhoneInput/PhoneColumn/PhoneEntry.resources/lang/{locale}/validation.php:
'phone' => [
'required' => 'The :attribute field is required.',
'invalid' => 'The :attribute must be a valid phone number.',
],
intl-tel-input and Laravel Phone for breaking changes (e.g., libphonenumber updates).customOptions) may need updates if underlying libraries change.validation.php) should be version-controlled.NumberParseException: Set defaultCountry or use lenient: true.filament:assets was run.validation.php translations.dd($phoneInput->getFullNumber()) to inspect parsed numbers.intl-tel-input errors.disableLookup()).intl-tel-input with Filament’s assets (no additional HTTP requests).customOptions for niche cases.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| `libphonen |
How can I help you explore Laravel packages today?