PHPackages                             garanaw/laravel-numeral - 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. garanaw/laravel-numeral

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

garanaw/laravel-numeral
=======================

The missing Numeral class from Laravel

1.3(11mo ago)44.7k↑20.8%PHPPHP &gt;=8.2|^8.3

Since Mar 27Pushed 11mo ago1 watchersCompare

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

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

laravel-numeral
===============

[](#laravel-numeral)

---

What is it?
-----------

[](#what-is-it)

This package inlines the Number helper with the Str helper. It does so by adding some functionality as well as introducing a number of tools:

Garanaw\\LaravelNumeral\\Support\\Numeral
-----------------------------------------

[](#garanawlaravelnumeralsupportnumeral)

This class is the one that should align with the existing Stringable. This wrapper allows chaining operations on numbers. Most of the native operations from PHP have been added, along with other helper functions. Some basic equations like fractals have been also added to this.

It uses the same traits than its sibling Stringable, however it's lacking some interfaces (JsonSerializable, ArrayAccess) as those don't apply to this scalar. PHP's \\Stringable (not to be confused with Illuminate\\Support\\Stringable) is implemented in order to cast the value to a string and allow visual representation in Blade (this is done with the existing Number's method format().

The decision of using this name instead of Numerable to fully align it with Stringable is due to the definition provided by Oxford's dictionary for the word "numeral": able to be counted

The class supports integers and floats.

Garanaw\\LaravelNumeral\\Support\\Number
----------------------------------------

[](#garanawlaravelnumeralsupportnumber)

New functionality has been added to this helper. Not everything that appears in Numeral has been doubled here, because simple operations such as additions would imply more cumbersomeness when used here rather than just doing 1 + 1.

However, a new random() method has been introduced here as a wrapper for PHP's Random\\Randomizer(). This functionality doesn't exist in the stateful class

num()
-----

[](#num)

To mimic the str() helper, a new num() helper has been introduced with similar functionality. This helper will return a Numeral object with the value passed as a parameter.

Garanaw\\LaravelNumeral\\Casts\\AsNumeral
-----------------------------------------

[](#garanawlaravelnumeralcastsasnumeral)

A new cast has also been added to the Eloquent's Casts folder. This will cast integers and floats to Numerals and back.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance52

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~149 days

Total

4

Last Release

333d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48f6c048ce0750165ae8c3dbd2756e75c543aad03014530e8a7f66793377a245?d=identicon)[Garanaw](/maintainers/Garanaw)

---

Top Contributors

[![Garanaw](https://avatars.githubusercontent.com/u/2251472?v=4)](https://github.com/Garanaw "Garanaw (14 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/garanaw-laravel-numeral/health.svg)

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

PHPackages © 2026

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