Weave 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

Select Country Code Laravel Package

tapp/select-country-code

A Laravel package for adding a country code selector to forms. It ships country and dial code data with a ready-to-use select component, making it easy to build searchable phone-number inputs in Blade views and Livewire components. Lightweight and simple to drop into any Laravel project.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a Laravel Nova field package, not a domain library. Its blast radius is confined to the admin/back-office layer: a PHP Field class plus a compiled Vue component registered through a service provider. It does not touch routing, persistence, auth, or business logic, and it imposes no schema opinion beyond "store a country code string in an existing column." That makes it architecturally cheap to adopt and equally cheap to remove — a genuinely low-coupling integration. The corollary is that it delivers a narrow UI convenience rather than a capability; there is no architectural leverage to be gained here, only a small build-vs-buy decision.

Integration feasibility. Mechanically trivial: composer require tapp/select-country-code, provider auto-discovery, then SelectCountryCode::make('country') on a Nova resource. The real feasibility question is version alignment. The only release is dated 2021-03-26, which places it squarely in the Nova 3 / Vue 2 era. Nova 4 moved custom fields to Vue 3 and a different laravel-nova npm toolchain; Nova 5 continues that line. Unless the package's compiled assets happen to be toolchain-agnostic (unlikely for a field that imports laravel-nova components), it will not render on Nova 4+ without a fork and rebuild. Composer constraints almost certainly also cap Laravel at 8/9, blocking Laravel 10/11 projects outright.

Technical risk. High, concentrated in maintenance and compatibility rather than runtime safety. The field is a dropdown bound to a static list — negligible attack surface, no queries, no side effects. The risks are lifecycle risks:

Risk Severity Notes
Unmaintained (single release, 2021) High No patch path for framework or Nova upgrades
Vue 2 → Vue 3 field API break High Blocks Nova 4/5 adoption
Composer constraint lock Medium May pin Laravel/PHP versions transitively
No community validation Medium 5 stars, 0 dependents — no production signal to borrow
Data staleness Low ISO 3166-1 changes rarely, but the source list is opaque
Build reproducibility Medium Committed compiled assets, unknown toolchain

Key questions for the maintainer / spike.

  1. Does it support Nova 4/5, or is the Vue component Vue 2-only? Is source (not just compiled JS) shipped?
  2. Does "country code" mean ISO 3166-1 alpha-2 (US, GB) or telephone dialing prefix (+1, +44)? These are different data models and the field name is ambiguous.
  3. Is the country list static, configurable, sortable, and localizable? Can entries be excluded?
  4. Does it support nullable values, validation rules, indexing/searching, and the standard Nova field modifiers?
  5. What is the license, and are there transitive dependencies with their own staleness?
  6. Is there any test coverage, or is the repo a code drop?

Integration Approach

Stack fit. Fit is binary on Nova version. If the estate is on Nova 3 / Laravel 8–9 / PHP 8.0, this is a drop-in and the integration cost is measured in minutes. If the estate is on Nova 4/5, treat the package as source material, not a dependency: vendor the PHP field class, rewrite the Vue component against the current laravel-nova toolchain, and own it internally.

Migration path. Two viable routes, and the decision should be made on effort, not on the package's merits:

  • Adopt-and-wrap (Nova 3 only). Install, use, and immediately fork into an internal namespace so the upgrade path is not hostage to a dormant upstream. Cost: ~half a day including the fork.
  • Build-in-house (recommended default). Nova's native Select field plus a maintained ISO dataset (e.g. league/iso3166) reproduces the entire capability in roughly the same half-day, with no third-party lifecycle exposure, no Vue compatibility question, and full control over alpha-2 vs. dialing-prefix semantics. Given the package's scope, this is the lower-risk path and the one I'd defend in review.

Compatibility. Verify before committing: composer why-not against the target Laravel and Nova constraints, the package's composer.json require block, and whether resources/js source is present. If only dist/ is shipped, the fork option degrades to the build-in-house option.

Sequencing.

  1. Confirm Nova major version and Laravel/PHP targets across affected apps.
  2. Timebox a 2-hour spike: install in a branch, render the field, exercise nullable/validation/search.
  3. Decide: adopt-and-wrap vs. build-in-house. Do not let the spike drift into a rescue project.
  4. If adopting, publish a data-migration note (existing free-text country columns will need normalization to the chosen code format).
  5. Roll out to one resource, then standardize the internal field across resources.

Operational Impact

Maintenance. Effectively zero upstream maintenance — one release in four years, no issue triage, no security-response path. The package must be treated as vendored code from day one, with an internal owner and a standing note in the dependency register explaining why a 5-star, zero-dependent package is present. Expect to revisit it at every Nova major upgrade, which is a recurring tax on a capability that costs half a day to own outright.

Support. None available. Escalation is "read the source," which is acceptable for a 100-line field and unacceptable for anything load-bearing. Do not place it anywhere the team cannot patch itself.

Scaling. Non-issue. The field executes only in the Nova admin SPA, renders a static options list, and adds no server-side cost, no query, and no asset weight beyond a single component chunk. Admin concurrency is not a dimension that matters here.

Failure modes.

  • Silent render failure after a Nova upgrade — the most likely failure; the field appears blank or throws in the browser console rather than at deploy time, so it will be caught by users, not CI.
  • Composer solve failure on Laravel 10/11 — blocks the whole application upgrade, forcing an emergency fork mid-migration.
  • Semantic drift — if the stored format is alpha-2 and a consumer expects dialing prefixes (or vice versa), downstream validation, SMS routing, or reporting breaks quietly.
  • Data staleness — low frequency, low impact, but unauditable with a static list.
  • Asset build rot — no reproducible path to rebuild the component if resources/js is absent.

Ramp-up. Negligible for any Laravel developer — an hour to read the field class and Nova's field conventions. The genuine onboarding cost is the institutional knowledge that this dependency is frozen, which belongs in the dependency register rather than in anyone's head.

Recommendation. Score and signals (0.125, 5 stars, 0 dependents, dormant since 2021) point the same direction as the technical read: this is a convenience, not a component worth a dependency. On Nova 3 it is a defensible stopgap only if immediately forked; on Nova 4+ it is not viable as-is. Default to the in-house Select + ISO dataset implementation, and reserve adoption for cases where the half-day of build time is genuinely unavailable.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core