Weave Code
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

Laravel Phone Laravel Package

propaganistas/laravel-phone

Add robust phone number validation, casting, and formatting to Laravel using Google’s libphonenumber (PHP port). Validate by country or dynamic country fields, cast model attributes to phone objects, format numbers consistently, and compare/evaluate phone metadata.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Core Feature Development: Enables robust phone number validation, storage, and formatting for user-facing applications (e.g., customer profiles, contact forms, or telecom platforms).
  • Compliance & UX: Supports GDPR/CCPA compliance by ensuring phone numbers are stored in standardized formats (E.164) while preserving user input for display.
  • Internationalization: Facilitates global user bases by validating and formatting numbers per country-specific rules (e.g., mobile vs. landline, regional prefixes).
  • Data Integrity: Reduces errors in phone-based workflows (e.g., SMS/voice verification, duplicate detection) via strict validation and normalization.
  • Roadmap Prioritization:
    • Build vs. Buy: Justifies adopting this package over custom solutions for teams lacking telecom expertise or needing rapid implementation.
    • Scalability: Ideal for projects expecting high-volume phone interactions (e.g., SaaS platforms, marketplaces).
    • Future-Proofing: Supports Laravel’s long-term roadmap (compatible with Laravel 13+) and leverages Google’s libphonenumber for accuracy.

When to Consider This Package

  • Adopt When:

    • Your app requires phone number validation (e.g., signup forms, contact fields).
    • You need multi-country support with country-specific formatting/rules.
    • Phone numbers must be stored consistently (e.g., E.164 for uniqueness) while preserving user input for display.
    • You’re using Laravel and want to avoid reinventing phone parsing logic.
    • Compliance or UX demands standardized phone handling (e.g., click-to-call links, international dialing).
  • Look Elsewhere If:

    • You need SMS/voice APIs (this package handles validation/formatting only; pair with Twilio, AWS SNS, etc.).
    • Your app is low-volume or phone numbers are trivial (e.g., internal tools).
    • You require advanced telecom features (e.g., carrier lookup, number portability checks).
    • Your stack isn’t Laravel/PHP (though the underlying libphonenumber can be used standalone).

How to Pitch It (Stakeholders)

For Executives: "This package solves a critical but often overlooked pain point: handling phone numbers reliably across global markets. It eliminates manual validation errors, ensures compliance with data storage standards (e.g., E.164), and improves user experience by supporting country-specific formatting. For example, a user in Belgium sees their number as 012 34 56 78, while our system stores it as +3212345678—enabling seamless integration with telecom APIs. With minimal dev effort, we gain enterprise-grade phone handling, reducing support costs and scaling effortlessly."

For Engineers: *"Leverage propaganistas/laravel-phone to:

  1. Validate phone inputs with country-specific rules (e.g., phone:US,BE or dynamic country fields).
  2. Cast Eloquent attributes to PhoneNumber objects for type safety and utility methods (e.g., $user->phone->formatNational()).
  3. Store numbers in normalized formats (E.164) while preserving raw input for display.
  4. Integrate with telecom APIs using standardized outputs (e.g., formatE164() for Twilio). Key tradeoff: Lightweight (~100KB) but requires upfront validation logic. Docs and demos are excellent; expect minimal maintenance."*
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope