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

Libphonenumber For Php Laravel Package

giggsey/libphonenumber-for-php

PHP port of Google’s libphonenumber for parsing, formatting, validating, and storing international phone numbers. Supports geocoding, carrier and timezone mapping, plus short-number info. Composer install; requires mbstring.

View on GitHub
Deep Wiki
Context7

Phone Number Matcher

A class that finds and extracts telephone numbers from text.

Getting Started

A search instance can be created by using PhoneNumberUtil::findNumbers()

PhoneNumberUtil::findNumbers()

Returns an instance of PhoneNumberMatcher, which can be iterated over (returning PhoneNumberMatch objects).

It searches the input $text for phone numbers, using the $defaultRegion. There are also optional parameters to set the phone number $leniency (look in Leniency for possible values), and the $maxTries to search for the phone number.

$phoneNumberUtil = \libphonenumber\PhoneNumberUtil::getInstance();

$text = "Hi, can you ring me at 1430 on 0117 496 0123. Thanks!";

$phoneNumberMatcher = $phoneNumberUtil->findNumbers($text, 'GB');

foreach ($phoneNumberMatcher as $phoneNumberMatch) {
    var_dump($phoneNumberMatch->number());
}
// (PhoneNumber) Country Code: 44 National Number: 1174960123
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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui