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

PhoneNumberToCarrierMapper

Getting Started

As with PhoneNumberUtil, the Phone Number Carrier Mapper uses a singleton.

$carrierMapper = \libphonenumber\PhoneNumberToCarrierMapper::getInstance();

getNameForNumber()

Returns the name of the carrier for the supplied PhoneNumber object within the $language supplied.

$chNumber = \libphonenumber\PhoneNumberUtil::getInstance()->parse("798765432", "CH");

var_dump($carrierMapper->getNameForNumber($chNumber, 'en'));
// string(8) "Swisscom"

getNameForValidNumber()

Returns the same as getNameForNumber() without checking whether it is a valid number for carrier mapping.

getSafeDisplayName()

Returns the same as getNameForNumber(), but only if the number is safe for carrier mapping. A number is only validate for carrier mapping if it's a Mobile or Fixed line, and the country does not support Mobile Number Portability.

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