Weave 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
Laravel Num

Laravel Num Laravel Package

ageekdev/laravel-num

A lightweight Laravel package for number formatting and conversion, offering convenient helpers to present numeric values consistently in your app. Includes a clean API for common number tasks and simple Laravel integration.

View on GitHub
Deep Wiki
Context7

To convert the unicode digit to another unicode digit.

Frequently asked questions about Laravel Num
How do I install ageekdev/laravel-num in a Laravel application?
Run composer require ageekdev/laravel-num:^2.0 on a project running PHP 8.2 or newer and Laravel 13. Laravel package auto-discovery registers the service provider and facade, so no manual wiring is normally needed. Verify your composer.json constraints first if you also pin Laravel components or other formatting packages.
Which PHP and Laravel versions does laravel-num v2 support?
Version 2.0.0 raises the minimum to PHP 8.2 and targets Laravel 13.x, while dropping Laravel 9 and 10. The release notes' third dropped version is ambiguous, so check the composer.json constraints before assuming Laravel 11 or 12 compatibility. Applications on older platforms should stay on the 1.x line until they upgrade.
What is ageekdev/laravel-num used for?
It converts Unicode digits from one digit set to another so numeric values can be presented consistently in a given locale. It also includes helpers for common number formatting tasks behind a clean Laravel facade. The package is stateless, with no migrations, queue workers, or persistence, which makes it low risk to adopt.
How do I convert English numbers to Arabic or Persian digits in Laravel?
Use the package's facade or helper, passing the numeric value and the target digit set or locale. Exact method names are documented in the README, so confirm the API before writing production code. If you want to limit coupling, wrap the call in a small application service and cover the digit ranges you support with tests.
Is upgrading to laravel-num v2.0.0 a breaking change?
The major bump appears driven by dropped PHP and Laravel version constraints rather than documented API or output-behavior changes. That is good for API stability but still needs verification, because formatting drift can quietly surface in invoices or reports. Run your golden-output tests against v2 in a branch before merging into production.
Can I use laravel-num on Laravel 10 or 11?
Not with v2, which drops Laravel 9 and 10 and, per the ambiguous release notes, likely 11 as well. Pin ^1.4 explicitly in composer.json on legacy services so a composer update cannot pull v2 and break the build. Treat the PHP and Laravel upgrade as its own tracked work item, then bump to ^2.0 afterward.
Does laravel-num require ext-intl or ICU locale data?
The package overview does not state an ext-intl requirement, but number and locale handling often relies on ICU data. Check composer.json and run the package's tests inside your actual container base image. If ext-intl is required, make sure it is installed in every environment, including CI and production.
How should I test number formatting to avoid regressions?
Use golden-file tests that assert exact formatted output for representative values, locales, and edge cases such as zero, negatives, and decimals. Run the same suite against v1 and v2 so silent behavioral changes are caught before release. A green test suite alone is not enough for formatting and locale output.
Is ageekdev/laravel-num actively maintained and safe for production?
It is a single-maintainer open-source utility with low activity, which is acceptable for a small stateless helper but means no SLA or security-policy guarantee. Pin a specific version, review release notes, and keep an in-house fallback in mind. Because the package is thin and low-coupling, replacing it later is inexpensive.
What are the alternatives to laravel-num for number formatting?
You can use PHP's intl NumberFormatter, Laravel's own string and number helpers where they fit, or a small in-house digit-conversion helper. The package's value is a clean Laravel facade and service provider around common digit conversion tasks. If you only need one conversion, an in-house helper may be simpler than adding a dependency.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console