{"id":36409521,"url":"https://github.com/ysfkaya/filament-phone-input","last_synced_at":"2026-01-23T22:45:43.655Z","repository":{"id":57536526,"uuid":"527199056","full_name":"ysfkaya/filament-phone-input","owner":"ysfkaya","description":"A phone input component that uses intl-tel-input for Laravel Filament","archived":false,"fork":false,"pushed_at":"2026-01-18T21:00:19.000Z","size":3022,"stargazers_count":276,"open_issues_count":4,"forks_count":56,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-19T05:29:35.597Z","etag":null,"topics":["filamentphp","intl-tel-input","laravel","phone","php"],"latest_commit_sha":null,"homepage":"https://filamentphp.com/plugins/ysfkaya-phone-input","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ysfkaya.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-21T12:24:21.000Z","updated_at":"2026-01-18T20:06:04.000Z","dependencies_parsed_at":"2023-02-17T19:45:32.703Z","dependency_job_id":"88da7f86-41f5-439f-b343-93aacee359fa","html_url":"https://github.com/ysfkaya/filament-phone-input","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.375,"last_synced_commit":"dcedaf6ba138779b52795a7e8cfed7c067d646c4"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/ysfkaya/filament-phone-input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysfkaya%2Ffilament-phone-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysfkaya%2Ffilament-phone-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysfkaya%2Ffilament-phone-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysfkaya%2Ffilament-phone-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ysfkaya","download_url":"https://codeload.github.com/ysfkaya/filament-phone-input/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysfkaya%2Ffilament-phone-input/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28702071,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filamentphp","intl-tel-input","laravel","phone","php"],"created_at":"2026-01-11T16:50:43.293Z","updated_at":"2026-01-23T22:45:43.648Z","avatar_url":"https://github.com/ysfkaya.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filament Phone Input\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ysfkaya/filament-phone-input/main/screenshots/input.png\" alt=\"Filament Phone Input\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\" class=\"flex items-center gap-2\"\u003e\n\u003ca href=\"https://packagist.org/packages/ysfkaya/filament-phone-input\"\u003e\u003cimg src=\"https://img.shields.io/badge/laravel-%23FF2D20.svg?style=for-the-badge\u0026logo=laravel\u0026logoColor=white\" style=\"max-width: 100%\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ysfkaya/filament-phone-input/actions?query=workflow%3Arun-tests+branch%3Amain\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/ysfkaya/filament-phone-input/run-tests.yml?style=for-the-badge\u0026logo=github\u0026label=TESTS\" alt=\"GitHub Tests Action Status\" data-canonical-src=\"https://img.shields.io/github/actions/workflow/status/ysfkaya/filament-phone-input/run-tests.yml?branch=main\u0026amp;label=tests\u0026style=for-the-badge\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/ysfkaya/filament-phone-input/stats\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/ysfkaya/filament-phone-input.svg?color=rgb(249%20115%2022)\u0026style=for-the-badge\" alt=\"Total Downloads\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/ysfkaya/filament-phone-input\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/ysfkaya/filament-phone-input?style=for-the-badge\u0026logo=packagist\u0026label=Version\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://filamentphp.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/filament-3-rgb(235%2068%2050)?style=for-the-badge\u0026amp;logo=laravel\" alt=\"Filament Version\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/badge/php-^8.1-rgb(249%20115%2022)?style=for-the-badge\u0026logo=php\" alt=\"PHP Version\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch2 class=\"filament-hidden\"\u003eTable of Contents\u003c/h2\u003e\n\n\u003cul class=\"table-of-contents filament-hidden\" dir=\"auto\"\u003e\n\u003cli\u003e\n\u003ca href=\"#introduction\"\u003eIntroduction\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#quick-preview\"\u003eQuick Preview\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"#separate-country-code\"\u003eSeparate Country Code\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#default-country\"\u003eDefault Country\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#validation\"\u003eValidation\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#display-number-format\"\u003eDisplay Number Format\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#input-number-format\"\u003eInput Number Format\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#focus-input-type\"\u003eFocus Input Type\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#disallow-dropdown\"\u003eDisallow Dropdown\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#hide-flags\"\u003eHide Flags\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#show-fullscreen-popup\"\u003eShow Fullscreen Popup\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#auto-placeholder\"\u003eAuto Placeholder\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#custom-container\"\u003eCustom Container\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#exclude-countries\"\u003eExclude Countries\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#initial-country\"\u003eInitial Country\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#only-countries\"\u003eOnly Countries\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#format-on-display\"\u003eFormat On Display\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#geo-ip-lookup\"\u003eGeo Ip Lookup\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#placeholder-number-type\"\u003ePlaceholder Number Type\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#country-order\"\u003eCountry Order\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#country-search\"\u003eCountry Search\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#strict-mode\"\u003eStrict Mode\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#cookie-name\"\u003eCookie Name\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#locale\"\u003eLocale\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#i18n\"\u003ei18n\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#format-as-you-type\"\u003eFormat as You Type\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#using-the-phoneinput-outside-of-filament\"\u003eUsing the PhoneInput outside of Filament\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#more\"\u003eMore\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#troubleshooting\"\u003eTroubleshooting\u003c/a\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"#propaganistaslaravelphoneexceptionsnumberparseexception-error\"\u003ePropaganistas\\LaravelPhone\\Exceptions\\NumberParseException error\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#upgrade-from-3x\"\u003eUpgrade From 3.x\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#testing\"\u003eTesting\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#changelog\"\u003eChangelog\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#credits\"\u003eCredits\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\n## Introduction\n\nThis package provides a phone input component for [Laravel Filament](https://filamentphp.com/). It uses [International Telephone Input](https://github.com/jackocnr/intl-tel-input) to provide a dropdown of countries and flags.\n\nThis package also includes with [Laravel Phone](https://github.com/propaganistas/laravel-phone) package. You can use all the methods of the Laravel Phone package.\n\n\u003e [!NOTE]\n\u003e For **Filament 3.x** use **[3.x](https://github.com/ysfkaya/filament-phone-input/tree/3.x)** branch\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require ysfkaya/filament-phone-input\n```\n\nPublish the assets:\n\n```bash\nphp artisan filament:assets\nphp artisan filament-phone-input:install\n```\n\n## Quick Preview\n\n```php\nPhoneInput::make(string $name)\n    -\u003ecountryStatePath(string | Closure $statePath, bool $isStatePathAbsolute)\n    -\u003evalidateFor(string | array $country = 'AUTO', int | array | null $type = null, bool $lenient = false)\n    -\u003edefaultCountry(string $value)\n    -\u003eipLookup(Closure $callback)\n    -\u003edisableLookup()\n    -\u003eenableIpLookup(bool | Closure $value = true)\n    -\u003einputNumberFormat(PhoneInputNumberType | Closure $format)\n    -\u003edisplayNumberFormat(PhoneInputNumberType | Closure $format)\n    -\u003efocusNumberFormat(PhoneInputNumberType | Closure $format)\n    -\u003eplaceholderNumberType(PhoneInputNumberType | Closure $format)\n    -\u003edisallowDropdown()\n    -\u003eallowDropdown(bool | Closure $value = true)\n    -\u003eautoPlaceholder(string $value = 'polite')\n    -\u003econtainerClass(string | Closure $value)\n    -\u003ecountryOrder(array | Closure | null $value)\n    -\u003ecountrySearch(bool | Closure $value = true)\n    -\u003ecustomPlaceholder(string | RawJs | Closure | null $value)\n    -\u003edropdownContainer(string | null | Closure $value)\n    -\u003eexcludeCountries(array | Closure $value)\n    -\u003efixDropdownWidth(bool | Closure $value = true)\n    -\u003eformatAsYouType(bool | Closure $value = true)\n    -\u003eformatOnDisplay(bool | Closure $value = true)\n    -\u003ei18n(array | Closure $value)\n    -\u003einitialCountry(string | Closure $value)\n    -\u003enationalMode(bool | Closure $value = true)\n    -\u003eonlyCountries(array | Closure $value)\n    -\u003eshowFlags(bool | Closure $value = true)\n    -\u003eseparateDialCode(bool | Closure $value = true)\n    -\u003euseFullscreenPopup(bool | Closure $value = true)\n    -\u003estrictMode(bool | Closure $value = true)\n    -\u003ecookieName(string | Closure $value)\n    -\u003elocale(string | Closure $value)\n    -\u003ecustomOptions(array | Closure $value)\n```\n\n## Usage\n\n```php\nuse Filament\\Forms;\nuse Filament\\Forms\\Form;\nuse Filament\\Tables;\nuse Filament\\Tables\\Table;\nuse Filament\\Infolists;\nuse Filament\\Infolists\\Infolist;\nuse Ysfkaya\\FilamentPhoneInput\\Forms\\PhoneInput;\nuse Ysfkaya\\FilamentPhoneInput\\Tables\\PhoneColumn;\nuse Ysfkaya\\FilamentPhoneInput\\Infolists\\PhoneEntry;\nuse Ysfkaya\\FilamentPhoneInput\\PhoneInputNumberType;\n\n  \n    public static function infolists(Infolist $infolist): Infolist\n    {\n        return $infolist\n            -\u003ecolumns([\n                Infolists\\Components\\TextEntry::make('name'),\n                Tables\\Columns\\TextColumn::make('email'),\n                PhoneEntry::make('phone')-\u003edisplayFormat(PhoneInputNumberType::NATIONAL),\n            ]);\n    }\n\n    public static function form(Form $form): Form\n    {\n        return $form\n            -\u003eschema([\n                Forms\\Components\\TextInput::make('name')\n                    -\u003erequired(),\n\n                Forms\\Components\\TextInput::make('email')\n                    -\u003erequired()\n                    -\u003eemail()\n                    -\u003eunique(ignoreRecord: true),\n\n                PhoneInput::make('phone'),\n            ]);\n    }\n\n    public static function table(Table $table): Table\n    {\n        return $table\n            -\u003ecolumns([\n                Tables\\Columns\\TextColumn::make('name')\n                    -\u003esortable()\n                    -\u003esearchable(),\n                Tables\\Columns\\TextColumn::make('email')\n                    -\u003esortable()\n                    -\u003esearchable(),\n\n                PhoneColumn::make('phone')-\u003edisplayFormat(PhoneInputNumberType::NATIONAL)\n            ]);\n    }\n```\n\n#### Separate Country Code\n\n---\n\nSometimes you may want to save the country code and the phone number in different columns. You can use the `countryStatePath` method to do that.\n\n```php\nPhoneInput::make('phone')\n    -\u003ecountryStatePath('phone_country')\n```\n\nTable column:\n\n```php\nPhoneColumn::make('phone')\n    -\u003ecountryColumn('phone_country')\n```\n\nInfolist entry:\n\n```php\nPhoneEntry::make('phone')\n    -\u003ecountryColumn('phone_country')\n```\n\nWhen you use the `countryStatePath` method, the country code will be saved to the `phone_country` column and the phone number will be saved to the `phone` column.\n\n#### Default Country\n\n---\n\nThe default country value is will be used while parsing the phone number. If you can getting the `Number requires a country to be specified.` or `Number does not match the provided country` error, you should set the default country.\n\n```php\nPhoneInput::make('phone')\n    -\u003edefaultCountry('US'),\n```\n\n\u003e [!NOTE]\n\u003e I think the main source of this problem is that there is no area code in the phone number previously recorded in your database. To fix this, `libphonenumber` expects a default phone number from us. Unfortunately, there is no ability to guess the country by phone number yet.\n\n\n#### Validation\n\n---\n\nYou may validate the phone number by using the `validateFor` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003evalidateFor(\n        country: 'TR' | ['US', 'GB'], // default: 'AUTO'\n        type: libPhoneNumberType::MOBILE | libPhoneNumberType::FIXED_LINE, // default: null\n        lenient: true, // default: false\n    ),\n```\n\n\u003e [!WARNING]\n\u003e Add an extra translation to your `validation.php` file.\n\nYou can find more information about the validation [here](https://github.com/Propaganistas/Laravel-Phone#validation)\n\n#### Display Number Format\n\n---\n\nYou may set the display format of the phone number by passing a format string to the `displayNumberFormat` method. The default format is `NATIONAL`. That means the phone number will be displayed in the format of the selected country.\n\n\u003e Available formats are;\n\n-   PhoneInputNumberType::E164\n-   PhoneInputNumberType::INTERNATIONAL\n-   PhoneInputNumberType::NATIONAL\n-   PhoneInputNumberType::RFC3966\n\n```php\nPhoneInput::make('phone')\n    -\u003edisplayNumberFormat(PhoneInputNumberType::E164),\n```\n\n\u003cp align=\"left\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ysfkaya/filament-phone-input/main/screenshots/display-number-format.png\" alt=\"Filament Phone Input\"\u003e\u003c/p\u003e\n\n#### Input Number Format\n\n---\n\nYou may set the input value type by passing a type string to the `inputNumberFormat` method. The default type is `E164`. That means the phone number will be saved in the format of the selected country to the **database**.\n\n```php\nPhoneInput::make('phone')\n    -\u003einputNumberFormat(PhoneInputNumberType::NATIONAL),\n```\n\n#### Focus Input Type\n\n---\n\nYou may set the focus input type by passing a type string to the `focusNumberFormat` method. The default value is `false`.\n\n```php\nPhoneInput::make('phone')\n    -\u003efocusNumberFormat(PhoneInputNumberType::E164),\n```\n\n\u003cp align=\"left\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ysfkaya/filament-phone-input/main/screenshots/focus-input-type.gif\" alt=\"Filament Phone Input\"\u003e\u003c/p\u003e\n\n#### Disallow Dropdown\n\n---\n\nYou may disable the dropdown by using the `disallowDropdown` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003edisallowDropdown(),\n```\n\n\u003cp align=\"left\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ysfkaya/filament-phone-input/main/screenshots/disallowed-dropdown.png\" alt=\"Filament Phone Input\"\u003e\u003c/p\u003e\n\n#### Hide Flags\n\n---\n\nIf you want to hide the flags, you may use the `showFlags` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003eshowFlags(false),\n```\n\n\u003e [!WARNING]\n\u003e Must be used in combination with `separateDialCode` option, or with `disallowDropdown`\n\n#### Show Fullscreen Popup\n\n---\n\nIf you want to show the fullscreen popup on mobile devices, you may use the `useFullscreenPopup` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003euseFullscreenPopup(),\n```\n\n#### Auto Placeholder\n\n---\n\nYou may set the auto placeholder type by using the `autoPlaceholder` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003eautoPlaceholder('aggressive'), // default is 'polite'\n```\n\n#### Custom Container\n\n---\n\nYou may set the additional classes to add to the parent div by using the `customContainer` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003ecustomContainer('w-full'),\n```\n\n#### Exclude Countries\n\n---\n\nYou may set the exclude countries by using the `excludeCountries` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003eexcludeCountries(['us', 'gb']),\n```\n\n#### Initial Country\n\n---\n\nYou may set the initial country by using the `initialCountry` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003einitialCountry('us'),\n```\n\n#### Only Countries\n\n---\n\nYou may set the only countries by using the `onlyCountries` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003eonlyCountries(['tr','us', 'gb']),\n```\n\n\u003cp align=\"left\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ysfkaya/filament-phone-input/main/screenshots/only-countries.png\" alt=\"Filament Phone Input\"\u003e\u003c/p\u003e\n\n#### Format On Display\n\nYou may set the format on display by using the `formatOnDisplay` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003eformatOnDisplay(false),\n```\n\n#### Geo Ip Lookup\n\n---\n\nIn default, the package performs a geoIp lookup to set the initial country while mounting the component. To disable this feature, you may use the `disableLookup` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003edisableLookup(),\n```\n\nYou may set the geoIp lookup by using the `geoIpLookup` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003eipLookup(function () {\n        return rescue(fn () =\u003e Http::get('https://ipinfo.io/json')-\u003ejson('country'), app()-\u003egetLocale(), report: false);\n    })\n```\n\n#### Placeholder Number Type\n\n---\n\nYou may set the placeholder number type by using the `placeholderNumberType` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003eplaceholderNumberType('FIXED_LINE'),\n```\n\n#### Country Order\n\n---\n\nYou may set the country order by using the `countryOrder` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003ecountryOrder(['us', 'gb', 'tr']),\n```\n\n#### Country Search\n\n---\n\nBy default, the country search mode is set to active. You can disable it by using the `countrySearch` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003ecountrySearch(false),\n```\n\n#### Strict Mode\n\n---\n\nAs the user types in the input, ignore any irrelevant characters. You can find more information about the strict mode in the [intl-tel-input](https://github.com/jackocnr/intl-tel-input#strictmode) documentation.\n\n```php\nPhoneInput::make('phone')\n    -\u003estrictMode(),\n```\n\n#### Cookie Name\n\n---\n\nWhen use the ip lookup feature, the package stores the country code in the cookie. The default cookie name is `intlTelInputSelectedCountry`. You can change it by using the `cookieName` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003ecookieName('myCookieName'),\n```\n\n#### Locale\n\n---\n\nDefault locale is coming from the `app()-\u003egetLocale()`. You can change it by using the `locale` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003elocale('en'),\n```\n\n#### i18n\n\n---\n\nYou can configure the localization of the component by using the `i18n` method. See the [intl-tel-input](https://github.com/jackocnr/intl-tel-input#i18n) for more information:\n\n```php\nPhoneInput::make('phone')\n    -\u003ei18n([\n        // Country names\n        'fr' =\u003e \"Frankreich\",\n        'de' =\u003e \"Deutschland\",\n        'es' =\u003e \"Spanien\",\n        'it' =\u003e \"Italien\",\n        'ch' =\u003e \"Schweiz\",\n        'nl' =\u003e \"Niederlande\",\n        'at' =\u003e \"Österreich\",\n        'dk' =\u003e \"Dänemark\",\n        // Other plugin text\n        \"selectedCountryAriaLabel\" =\u003e'Ausgewähltes Land',\n        \"countryListAriaLabel\" =\u003e'Liste der Länder',\n        \"searchPlaceholder\" =\u003e'Suchen',\n    ]),\n```\n\n#### Format as You Type\n\n---\n\nAutomatically format the number as the user types. You can disable it by using the `formatAsYouType` method:\n\n```php\nPhoneInput::make('phone')\n    -\u003eformatAsYouType(false),\n```\n\n#### Using the `PhoneInput` outside of Filament\n\nA livewire component:\n\n```php\n\u003c?php\n\nuse Filament\\Forms\\Concerns\\InteractsWithForms;\nuse Filament\\Forms\\Contracts\\HasForms;\nuse Filament\\Forms\\Form;\nuse Illuminate\\Support\\Facades\\View;\nuse Livewire\\Component as Livewire;\nuse Ysfkaya\\FilamentPhoneInput\\Forms\\PhoneInput;\n\nclass Component extends Livewire implements HasForms\n{\n    use InteractsWithForms;\n\n    public array $data = [];\n\n    public function mount()\n    {\n        // Do not forget to fill the form\n        $this-\u003eform-\u003efill();\n    }\n\n    public function form(Form $form): Form\n    {\n        return $form\n            -\u003eschema([\n                PhoneInput::make('phone'),\n            ])-\u003estatePath('data');\n    }\n\n    public function render()\n    {\n        return view('livewire.component');\n    }\n}\n```\n\nA blade component:\n\n```blade\n{{-- views/livewire/component.blade.php --}}\n\u003cdiv\u003e\n    {{ $this-\u003eform }}\n\u003c/div\u003e\n```\n\nA blade layout:\n\n```blade\n{{-- views/components/layouts/app.blade.php --}}\n\u003chtml\u003e\n\u003chead\u003e\n    \u003cmeta name=\"csrf-token\" content=\"{{ csrf_token() }}\"\u003e\n\n    \u003cscript\n        src=\"https://cdn.jsdelivr.net/npm/async-alpine@1.x.x/dist/async-alpine.script.js\"\n        defer\n    \u003e\u003c/script\u003e\n    \u003cscript\n        src=\"https://unpkg.com/alpine-lazy-load-assets@latest/dist/alpine-lazy-load-assets.cdn.js\"\n        defer\n    \u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    {{ $slot }}\n\n    @stack('scripts')\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n#### More\n\n---\n\nYou can find the more documentation for the intel tel input [here](https://intl-tel-input.com/)\n\n## Troubleshooting\n\n### `Propaganistas\\LaravelPhone\\Exceptions\\NumberParseException` error\n\n- Make sure you have set the [default country](#default-country). If you still receive this error, you can open an issue detailing what you did.\n\n## Upgrade From 3.x\n\nIf you are upgrading from 3.x, you should publish the assets again.\n\n```bash\nphp artisan filament:assets\nphp artisan filament-phone-input:install\n```\n\u003ca name=\"testing\"\u003e\u003c/a\u003e\n\n## Testing\n\nRun following command to prepare testing environment.\n\n```bash\ncomposer prepare-test\n```\n\nRun following command to run tests.\n\n```bash\ncomposer test\n```\n\n\u003ca name=\"changelog\"\u003e\u003c/a\u003e\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n\u003ca name=\"credits\"\u003e\u003c/a\u003e\n\n## Credits\n\n-   [Yusuf Kaya](https://github.com/ysfkaya)\n-   [All Contributors](https://github.com/ysfkaya/filament-phone-input/graphs/contributors)\n\n\u003ca name=\"license\"\u003e\u003c/a\u003e\n\n## License\n\nThe MIT License (MIT). Please see [License File](https://github.com/ysfkaya/filament-phone-input/blob/main/LICENCE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysfkaya%2Ffilament-phone-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fysfkaya%2Ffilament-phone-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysfkaya%2Ffilament-phone-input/lists"}