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

Nova Phone Field Laravel Package

yieldstudio/nova-phone-field

A Laravel Nova field for phone numbers, built on the intl-tel-input library. It provides an interactive country selector, automatic formatting, and validation so you can store phone numbers in a consistent international format within your Nova resources.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: nova-phone-field is a Laravel Nova custom field with a narrow integration surface: it affects phone capture and display inside Nova resources, not core domain logic. The 2.0.0 decision to store values in E.164 is architecturally correct for canonical phone storage: it decouples persisted data from presentation formatting, improves interoperability with SMS/API/validation workflows, and makes index/detail formatting a concern of libphonenumber-js rather than the database. This fits well where Nova is the admin capture surface and downstream systems expect normalized phone numbers.
  • Integration feasibility: High for greenfield Nova resources. Medium for existing installations because 2.0.0 is a breaking data-semantic release: existing rows contain formatted values and must be normalized. The supplied SQL is a useful starting point but not a production migration strategy. REGEXP_REPLACE is not portable across all Laravel-supported databases and may not exist on older MySQL/MariaDB versions. The CONCAT('+', REGEXP_REPLACE(...)) pattern also risks invalid E.164 values for numbers stored with international prefixes such as 00, extensions, short codes, nulls, or malformed legacy data. The new copyable and helper options are low-risk UI additions, and the inputmask 5 upgrade is valuable because it fixes copy/paste and indicator behavior, but it still requires asset compatibility testing.
  • Technical risk: High primarily due to persisted data migration and downstream consumer assumptions. Risks include invalid or corrupted phone values, loss of extensions/formatting context, display regressions if libphonenumber-js formatting fails, API/export/search behavior changes, and rollback complexity after E.164 is written. Frontend risk is medium: inputmask 5 and published Nova assets must work with the supported Nova/Laravel stack. Laravel Pint replacing PHPCS is development tooling only and does not affect runtime risk.
  • Key questions:
    • Which Nova, Laravel, PHP, and database versions are supported by 2.0.0?
    • Does the field enforce E.164 validation on input, or only store a normalized value?
    • How should existing values with extensions, short codes, national-only numbers, or 00 international prefixes be handled?
    • Are application models, APIs, exports, search, or integrations currently expecting formatted values?
    • What is the rollback plan if migrated values are found to be invalid in production?
    • Are frontend assets rebuilt/published correctly with inputmask 5 and libphonenumber-js?

Integration Approach

  • Stack fit: Good fit for Laravel/Nova admin workflows. The package remains a presentation-and-input concern for Nova resources; stored E.164 values are more useful to backend services than formatted strings. Teams should confirm they are willing to treat phone numbers as normalized identifiers and move human-readable formatting to the display layer.
  • Migration path: Do not apply the release-note SQL directly in production. First inventory all phone columns and classify values as valid international, national, prefixed, malformed, empty, or extension-bearing. Prefer a staged application-level migration using a PHP phone-number parsing library, with explicit rules for nulls, invalid values, and extensions. Back up data, run the migration in staging against a production-like copy, and produce a validation report showing counts of converted, skipped, and quarantined records. Update tests and downstream consumers before production rollout. For new fields, adopt E.164 storage directly.
  • Compatibility: Verify Nova version constraints, PHP/Laravel support, asset build pipeline, and browser behavior for inputmask 5. Confirm that copyable and helper APIs are documented and supported by the target Nova version. Check database portability before using REGEXP_REPLACE; for MySQL 5.7, SQLite, PostgreSQL, or MariaDB variants, use application code or engine-specific migration logic. Validate that libphonenumber-js is bundled/published as expected.
  • Sequencing:
    1. Pin 2.0.0 in a branch and confirm dependency compatibility.
    2. Audit existing phone data and define conversion policy.
    3. Build and dry-run a validated migration in staging.
    4. Update application consumers, exports, search, and tests to expect E.164.
    5. Rebuild/publish Nova assets and smoke-test index, detail, form, copy, and helper behavior.
    6. Deploy with backups and a monitored rollout; reconcile invalid records.
    7. Retain a rollback plan, recognizing that reverting to 1.x after E.164 writes may not restore prior display behavior automatically.

Operational Impact

  • Maintenance: The package is small and focused, and active maintenance is a positive signal. Laravel Pint is a tooling change only. The main maintenance burden is not runtime code but keeping Nova asset builds, JS dependencies, and phone-number normalization rules aligned across environments.
  • Support: Expect elevated support during upgrade because users may see changed values and invalid legacy records. Provide a runbook for data cleanup, a validation report, and guidance for admins on copyable fields and helper text. Downstream teams need clear notice that stored phone values are now E.164, not formatted display strings.
  • Scaling: Runtime impact is negligible for normal Nova usage. E.164 storage is compact and suitable for indexing. The operational scaling concern is the backfill: large phone-column migrations should be batched, monitored for locks, and validated incrementally rather than run as a single blocking SQL statement.
  • Failure modes: Invalid E.164 values such as a lone +, mishandled 00 prefixes, lost extensions, null/empty values, frontend formatting failures, clipboard permission issues, inputmask regressions, and downstream systems still expecting formatted strings. Production rollback can be difficult once E.164 data is written, so backup and reconciliation steps are mandatory.
  • Ramp-up: Developer ramp-up is low: the field API and Nova integration are straightforward. Data/operations ramp-up is medium: the team needs time for phone-data audit, migration validation, staged rollout, and support readiness. Allocate TPM/engineering ownership for the migration plan rather than treating this as a routine composer update.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource