PHPackages                             ageekdev/laravel-num - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ageekdev/laravel-num

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ageekdev/laravel-num
====================

To convert the unicode digit to another unicode digit.

v2.0.0(1mo ago)194123[1 PRs](https://github.com/ageekdev/laravel-num/pulls)MITPHPPHP ^8.2CI passing

Since Feb 27Pushed 1mo agoCompare

[ Source](https://github.com/ageekdev/laravel-num)[ Packagist](https://packagist.org/packages/ageekdev/laravel-num)[ RSS](/packages/ageekdev-laravel-num/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (20)Versions (14)Used By (0)

Laravel Num
===========

[](#laravel-num)

[![Latest Version on Packagist](https://camo.githubusercontent.com/254648e7c01080e7a4173c702adb85d848aa243c3bd1e4431ae3032f7bf42133/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616765656b6465762f6c61726176656c2d6e756d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ageekdev/laravel-num)[![Laravel 12.x](https://camo.githubusercontent.com/19d5bb0370853f3f5f64da8e47f7b2e14803b7fa5f7c8d04e347ac6849edb9ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d7265642e7376673f7374796c653d666c61742d737175617265)](https://laravel.com/docs/12.x)[![Laravel 13.x](https://camo.githubusercontent.com/9323befa9be5b825f59a9c06b973952579a0a8986f0e0cc2fd3b19640afcaf59/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332e782d7265642e7376673f7374796c653d666c61742d737175617265)](https://laravel.com/docs/13.x)[![GitHub Tests Action Status](https://camo.githubusercontent.com/63d4a1ef785ba780b919cba8db126902513565a64013ef828ab128052808d439/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616765656b6465762f6c61726176656c2d6e756d2f72756e2d74657374732e796d6c3f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ageekdev/laravel-num/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/f7db1a1c316b7f005cb9ee40361eb4c2eef8726b471d97b82a27dd2cc21213c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616765656b6465762f6c61726176656c2d6e756d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ageekdev/laravel-num)

To convert the unicode digit to another unicode digit.

Supported languages
-------------------

[](#supported-languages)

By default, You can convert english, myanmar and thai numbers. If you would like to add more, you can add `zero unicode characters` at config/num.php. You can see more `zero unicode character` at [zero-unicode.md](zero-unicode.md).

Installation
------------

[](#installation)

You can install this package via composer using this command:

```
composer require ageekdev/laravel-num
```

The package will automatically register itself.

Publish configuration and asset files

```
php artisan vendor:publish --provider="AgeekDev\Num\NumServiceProvider"
```

Usage
-----

[](#usage)

### Using the facade

[](#using-the-facade)

**Direct convert from the english number to the myanmar number**

```
Num::convert('1234๑๒๓๔','mm','en');
// ၁၂၃၄๑๒๓๔
```

---

**Convert to the myanmar number**

```
Num::toMyanmar('1234๑๒๓๔');
// ၁၂၃၄၁၂၃၄
```

---

**Convert to the thai number**

```
Num::toThai('1234');
// ๑๒๓๔
```

---

**Convert to the english number**

```
Num::toEnglish('၁၂၃၄');
// 1234
```

### Using with Helpers

[](#using-with-helpers)

**Convert to the myanmar number**

```
num_to_mm('1234');
// ၁၂၃၄
```

---

**Convert to the thai number**

```
num_to_th('1234');
// ๑๒๓๔
```

---

**Convert to the english number**

```
num_to_eng('၁၂၃၄');
// 1234
```

Macro
-----

[](#macro)

The Laravel Num allows you to define "macros", which can serve as a fluent, expressive mechanism to configure string, to language and from language when interacting with services throughout your application. To get started, you may define the macro within the boot method of your application's App\\Providers\\AppServiceProvider class:

```
use AgeekDev\Num\Facades\Num;

/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    Num::macro('toMyanmarShan', function (int|string|null $string, string $from = null) {
        return Num::convert($string, 'shan', $from);
    });
}
```

Once your macro has been configured, you may invoke it from anywhere in your application to convert numbers with the specified configuration:

```
$numbers = Num::toMyanmarShan('1234567890');

// ႑႒႓႔႕႖႗႘႙႐
```

**Note**If convert language don't have in num.php, you may configure this language in your num configuration file.

```
'zeros' => [
    'en' => 0,
    'mm' => '၀',
    'th' => '๐',
    'shan' => '႐'
],
```

Testing
-------

[](#testing)

You can run the tests with:

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Tint Naing Win](https://github.com/tintnaingwinn)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance88

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~185 days

Recently: every ~229 days

Total

9

Last Release

58d ago

Major Versions

v1.4.0 → v2.0.02026-03-21

PHP version history (4 changes)v1.0.0PHP ^8.0

v1.1.0PHP ^8.0|^8.1|^8.2

v1.3.0PHP ^8.1

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13062143?v=4)[Tint Naing Win](/maintainers/tintnaingwin)[@tintnaingwin](https://github.com/tintnaingwin)

---

Top Contributors

[![tintnaingwin](https://avatars.githubusercontent.com/u/13062143?v=4)](https://github.com/tintnaingwin "tintnaingwin (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![tintnaingwin-genie](https://avatars.githubusercontent.com/u/99861060?v=4)](https://github.com/tintnaingwin-genie "tintnaingwin-genie (1 commits)")

---

Tags

laravelnumberphpunicodelaravelunicodeenglishnumberthaiMyanmar

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ageekdev-laravel-num/health.svg)

```
[![Health](https://phpackages.com/badges/ageekdev-laravel-num/health.svg)](https://phpackages.com/packages/ageekdev-laravel-num)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[unicodeveloper/laravel-emoji

A Laravel 5 Package for Using &amp; Working With Emojis

21024.9k](/packages/unicodeveloper-laravel-emoji)[stidges/laravel-country-flags

A Laravel wrapper for the stidges/country-flags package

28134.6k](/packages/stidges-laravel-country-flags)[hnhdigital-os/laravel-number-converter

Number to word, roman, ordinal converter

20163.3k2](/packages/hnhdigital-os-laravel-number-converter)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
