Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] feat: add useful defaultLocale and defaultCurrency helpers to Number facade #53101

Conversation

sts-ryan-holton
Copy link
Contributor

Hi 👋,

The following is a very simple PR that allows us to return whatever the application's default $currency and $locale are. I was initially considering changing the variables from protected to public so that we wouldn't need these functions, I'm still open to this.

Usage:

Number::defaultLocale() // returns default locale
Number::defaultCurrency() // returns default currency

@taylorotwell taylorotwell merged commit cdffc89 into laravel:11.x Oct 10, 2024
31 checks passed
timacdonald pushed a commit to timacdonald/framework that referenced this pull request Oct 15, 2024
…Number facade (laravel#53101)

* feat: add useful defaultLocale and defaultCurrency helpers to Number facade and tests

* feat: add useful defaultLocale and defaultCurrency helpers to Number facade and tests

* feat: add useful defaultLocale and defaultCurrency helpers to Number facade and tests

* Update Number.php

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants