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 Google libphonenumber-powered phone number validation and utilities to Laravel. Validate numbers by country (static list or matching a companion country field), cast attributes, format and compare numbers, and access phone metadata using a simple PhoneNumber class.

View on GitHub
Deep Wiki
Context7
6.0.2

What's Changed

New Contributors

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/6.0.1...6.0.2

6.0.0

A note about this version

This version has feature-parity with the last version of 5.x, but the codebase has been reworked because libphonenumber shifted from using class constants to native enums. Most applications should be able to upgrade quite easily though, but no need to rush (see below). Read the upgrade guide for more information.

Additionally:

  • Dropped support for Laravel 10
  • Dropped support for PHP 8.1
  • Type hints have been added to parameters and return types to the codebase where applicable. While already working code should continue to operate properly, you might be warned by your IDE about mismatching types.

Do I need to upgrade as soon as possible?

No. The last version of 5.x has been deliberately released to allow libphonenumber updates to be installed for a considerable period of time while staying on 5.x.

Am I missing out on something if I don't upgrade?

No, not for the (long?) time being. This package is quite feature-complete. You only need to upgrade if you want to use libphonenumber's enums or just want to stay ahead of things and be future-proof anyway.

5.3.6
  • Support for libphonenumber v9.

Note: this is the last minor/patch version in the v5 realm of this package. libphonenumber shifted from using class constants to native enums. Conditional statements were added to achieve combined support for v8 and v9 while keeping Laravel-Phone as-is. This way, given that this package is quite feature-complete, updates on libphonenumber can still be installed for a considerable period of time without having to account for semantic breaking changes.

Starting from the next major version, Laravel-Phone will be reworked to fully harness the power of enums.

5.3.5

Added PhpDoc to casts for improved IDE-helper support (fixes #268 )

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.3.4...5.3.5

5.3.2

Marking classes as internal to denote that they shouldn't be used publicly.

5.3.0

What's Changed

libphonenumber-for-php-lite is a lightweight drop-in replacement for libphonenumber-for-php which significantly reduces the package size being pulled in. libphonenumber-for-php-lite excludes geolocation, carrier information and short number info.

This is a non-breaking change for functionality provided by Laravel-Phone.

[!IMPORTANT]
If you have defined a macro, please review your code and if needed require giggsey/libphonenumber-for-php as an explicit dependency in your project.

5.2.0

Added support for Laravel 11 Dropped support for Laravel 9 Dropped support for PHP 8.0

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.1.1...5.2.0

5.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.1.0...5.1.1

5.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/5.0.3...5.1.0

5.0.3

The long-due codebase cleanup.

The package now minimally requires PHP 8.0 and Laravel 9.0. It also supports Laravel 10. All documented behavior is preserved. There are just some minor syntactical changes that might need your attention.

Please review the upgrade guide.

4.4.4

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.4.3...4.4.4

Bugfix for #213 - Support international numbers prefixed with country code

4.4.1

What's Changed

New Contributors

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.4.0...4.4.1

4.4.0

New functionality

  • Add equals() and notEquals() methods to PhoneNumber by @Propaganistas

What's Changed

New Contributors

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.3.8...4.4.0

4.3.8
4.3.7

Fixed deprecation notices on PHP 8.1

4.3.6

Added support for Laravel 9

4.3.4

Improve auto detection validation

4.3.3
4.3.2

What's Changed

New Contributors

Full Changelog: https://github.com/Propaganistas/Laravel-Phone/compare/4.3.1...4.3.2

4.3.1
4.3.0

Introduced two custom cast classes. See this section in the documentation.

Dropped support for Laravel 6, Laravel 7 and Laravel 8.0 - 8.8.

4.2.7

Added support for PHP 8.0

4.2.6

Added the getRawNumber() method to PhoneNumber to retrieve the original raw number.

4.2.5

Added support for Laravel 8.

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport