Propaganistas / Laravel-Phone

Phone number functionality for Laravel
https://laravel-phone.herokuapp.com/
MIT License
2.75k stars 218 forks source link

Formatting with "auto-discovery" #55

Closed keptdream closed 7 years ago

keptdream commented 7 years ago

Hello, I'd like to use the formatter like the validator with auto-discovery and fallback countries

phone($phone_number, $country_code = "AUTO,CH,...", $format = PhoneNumberFormat::INTERNATIONAL)

So, I want to store fomatted phone numbers in my database without using the "country" field. Because I already have a country field in my database and I also use it as last fall-back method. And I don't want to annoy or confuse any people by asking the country again. It would be a very nice addition.

keptdream commented 7 years ago

Sorry, could not wait. I created pull request for this issue: https://github.com/Propaganistas/Laravel-Phone/pull/56 Hope that this will work.

Propaganistas commented 7 years ago

Thanks for the suggestion. Seems like a nice addition indeed. Will implement this in the next few days.

Propaganistas commented 7 years ago

The requested feature is available in v3.0.0

Please be weary of the breaking changes when updating (see the release note).

keptdream commented 7 years ago

Thank you!