PHPackages                             rokde/number-generator - 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. rokde/number-generator

ActiveLibrary

rokde/number-generator
======================

A number generator with placeholders for laravel. It creates various number-based formats like invoice numbers or customer numbers.

1.0.0(2y ago)22[1 PRs](https://github.com/rokde/number-generator/pulls)MITPHPPHP ^8.2CI passing

Since Jan 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/rokde/number-generator)[ Packagist](https://packagist.org/packages/rokde/number-generator)[ Docs](https://github.com/rokde/number-generator)[ GitHub Sponsors](https://github.com/rokde)[ RSS](/packages/rokde-number-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (4)Used By (0)

number generator
================

[](#number-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bfaf501a4619d42b70270419fc19cd3c5b8a3bfa4ce7df869c0f4d766eba6f56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6b64652f6e756d6265722d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rokde/number-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d9be759150ec5282a925bcae8202e12cc71a5d0b5c5e9f1db18adbf556216519/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726f6b64652f6e756d6265722d67656e657261746f722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/rokde/number-generator/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/80a4e32c0d82ec666953fa186a81389f9c8cb9bea8ab350bb3eac1320a96afe5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726f6b64652f6e756d6265722d67656e657261746f722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/rokde/number-generator/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0cb9c3e13dfe244fac53c40a224abe7644f7b5bce947f46223a4ad5a114fc6bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6b64652f6e756d6265722d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rokde/number-generator)

A number generator with placeholders. It creates various number-based formats like invoice numbers or customer numbers.

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

[](#installation)

You can install the package via composer:

```
composer require rokde/number-generator
```

Usage
-----

[](#usage)

```
$numberGenerator = new \Rokde\NumberGenerator();
// set placeholders
$numberGenerator->set('YYYY', 2024) // static values
    ->set('index', fn () => str_pad('2', 4, '0', STR_PAD_LEFT)) // dynamic values
    ->set('iban', new IbanValue('DE02120300000000202051', ' ')) // formatter value

// rendering an invoice number
echo $numberGenerator->render('INV-{YYYY}-{index}'); // INV-2024-0002
echo $numberGenerator->render('IBAN: {iban}'); // IBAN: DE02 1203 0000 0000 2020 51
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Robert Kummer](https://github.com/rokde)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance60

Regular maintenance activity

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

853d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4946056?v=4)[Robert Kummer](/maintainers/rokde)[@rokde](https://github.com/rokde)

---

Top Contributors

[![rokde](https://avatars.githubusercontent.com/u/4946056?v=4)](https://github.com/rokde "rokde (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

---

Tags

laravelnumber-generator

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rokde-number-generator/health.svg)

```
[![Health](https://phpackages.com/badges/rokde-number-generator/health.svg)](https://phpackages.com/packages/rokde-number-generator)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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