@@ -13,15 +13,15 @@ |
||
| 13 | 13 | * @return string |
| 14 | 14 | */ |
| 15 | 15 | function phone_format($phone, $country = null, $format = PhoneNumberFormat::INTERNATIONAL) |
| 16 | - { |
|
| 17 | - $lib = App::make('libphonenumber'); |
|
| 16 | + { |
|
| 17 | + $lib = App::make('libphonenumber'); |
|
| 18 | 18 | |
| 19 | - if (!$country) { |
|
| 20 | - $country = App::getLocale(); |
|
| 21 | - } |
|
| 19 | + if (!$country) { |
|
| 20 | + $country = App::getLocale(); |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - $phoneNumber = $lib->parse($phone, $country); |
|
| 23 | + $phoneNumber = $lib->parse($phone, $country); |
|
| 24 | 24 | |
| 25 | - return $lib->format($phoneNumber, $format); |
|
| 26 | - } |
|
| 25 | + return $lib->format($phoneNumber, $format); |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -8,11 +8,11 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class LaravelPhoneFacade extends \Illuminate\Support\Facades\Facade |
| 10 | 10 | { |
| 11 | - /** |
|
| 12 | - * @return string |
|
| 13 | - */ |
|
| 14 | - protected static function getFacadeAccessor() |
|
| 15 | - { |
|
| 16 | - return 'libphonenumber'; |
|
| 17 | - } |
|
| 11 | + /** |
|
| 12 | + * @return string |
|
| 13 | + */ |
|
| 14 | + protected static function getFacadeAccessor() |
|
| 15 | + { |
|
| 16 | + return 'libphonenumber'; |
|
| 17 | + } |
|
| 18 | 18 | } |