My first commit of codes
This commit is contained in:
8
vendor/propaganistas/laravel-phone/helpers.php
vendored
Normal file
8
vendor/propaganistas/laravel-phone/helpers.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
function phone_format($phone, $country, $format = null) {
|
||||
$phoneUtil = \libphonenumber\PhoneNumberUtil::getInstance();
|
||||
$phoneProto = $phoneUtil->parse($phone, $country);
|
||||
$format = is_null($format) ? \libphonenumber\PhoneNumberFormat::INTERNATIONAL : $format;
|
||||
return $phoneUtil->format($phoneProto, $format);
|
||||
}
|
||||
Reference in New Issue
Block a user