- How do I install chapdel/laravel-tel-input in a Laravel application?
- Install it with Composer using composer require chapdel/laravel-tel-input, then optionally publish the config and front-end assets with vendor:publish. After that, replace your existing input type="tel" markup with the package's Blade component and add the provided validation rule to the relevant FormRequest. The whole change is small in scope, and a typical app finishes the swap in about half a day, most of which is spent adjusting form markup and CSS.
- Does laravel-tel-input work with Livewire components?
- Yes. The package ships a Blade component and is explicitly built for both Blade views and Livewire components, so it drops into server-rendered forms either way. Because it is a presentation-layer wrapper around the intl-tel-input JavaScript plugin, the component handles the widget while your Livewire component and validation rule handle the value. If you are using Livewire's wire:model bindings, confirm the component's model binding and event behaviour against the version you pin before rolling it out across forms.
- Which Laravel and PHP versions does chapdel/laravel-tel-input support?
- The package is aimed at Laravel 10, 11 and 12 monoliths using Blade or Livewire. The maintainer's 2.0 release notes do not enumerate minimum PHP and Laravel versions, so read the composer.json of the exact version you pin rather than assuming. Check that constraint against your supported framework matrix today and for the next twelve months before upgrading.
- How do I validate a phone number with the package's validation rule?
- Add the package's telephone rule to your FormRequest rules array or to a manual Validator call, alongside your usual required and max-length rules. The rule wraps libphonenumber-style validation so numbers are checked for real international format rather than just character count. Because the rule signature and any constructor arguments such as country allow-lists may have changed between 1.x and 2.0, verify the exact usage against the source of your pinned version before editing call sites.
- Can I configure allowed countries or a default country for the phone input?
- Country behaviour is configured through the published config file and, in most setups, through options passed to the component or the validation rule. Publish the config with vendor:publish and keep your customisations under version control, since a forced re-publish can silently overwrite local changes. Enumerate your existing call sites first, because props and constructor arguments are one of the areas a major release is most likely to rename.
- Should I upgrade from 1.x to 2.0 of laravel-tel-input?
- Treat 2.0 as unassessed rather than approved, and pin to ^1.1.6 in the meantime. The release notes for 2.0 are a bare compare link with no changelog body, no migration guide and no enumerated breaking changes, so the blast radius is unknown. Read the actual diff and any CHANGELOG or UPGRADING file before committing, and note the package is rarely on a critical path, so there is little urgency to take an uninspected major bump.
- Does version 2.0 of laravel-tel-input switch from Laravel Mix to Vite for assets?
- That is an unverified hypothesis, not a documented change, but it is one of the most likely candidates for a major bump in a package that ships front-end assets. If the published asset paths or the recommended @vite and @stack usage changed, the upgrade becomes a build-pipeline change rather than a simple composer update. Check what the package publishes and how the layout loads it before deciding which kind of upgrade you are doing.
- Is laravel-tel-input a good fit for an API-only or Inertia/React/Vue application?
- Generally no. The value in this package is Blade ergonomics plus a validation rule, and neither transfers to a backend that serves JSON or a SPA that owns its own design system. For those stacks, use the intl-tel-input JavaScript plugin directly in your front end and validate server-side with a standalone phone-number rule. Pulling in Blade markup you will discard adds a dependency for no benefit.
- Will client-side formatting and server-side validation agree after installing this package?
- That agreement is the package's main risk surface, since it touches views, published assets and the validator without going near your domain models or persistence. Before and after rollout, test that numbers your app previously accepted are still accepted and that values previously normalised still normalise identically. Cover it with feature tests that post representative international numbers through the relevant FormRequests, including edge cases like extensions and numbers without a country code.
- Is chapdel/laravel-tel-input actively maintained, and is it safe to depend on?
- It is a small, single-purpose package with one Composer dependency, a service provider, publishable config and assets, a component and a validation rule, which keeps its architectural weight low. The weak signal is release discipline: the 2.0 notes are a link-only changelog with no migration guide, so check whether the repository has a tagged release artifact and a passing CI matrix rather than just a tag. Review the maintainer's issue response times and release cadence, and keep the dependency pinned until that review is done.