PHPackages                             kaantanis/coderator - 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. kaantanis/coderator

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

kaantanis/coderator
===================

Simple unique code generator with optional configurations

v1.0.3(2y ago)0214[1 PRs](https://github.com/KaanTanis/coderator/pulls)1MITPHPPHP ^8.1

Since Nov 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/KaanTanis/coderator)[ Packagist](https://packagist.org/packages/kaantanis/coderator)[ Docs](https://github.com/kaantanis/coderator)[ RSS](/packages/kaantanis-coderator/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (7)Versions (5)Used By (1)

Simple unique code generator with optional configurations
=========================================================

[](#simple-unique-code-generator-with-optional-configurations)

[![Latest Version on Packagist](https://camo.githubusercontent.com/177dc2f5226fa5a6da8ed600aae9aac2947717e3209f80ccc7ca217e0a6e3962/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61616e74616e69732f636f64657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kaantanis/coderator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/48d35edd5e4dcc20ba29d1951487e049f43410fa5c66cfafb820d35f627a29b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6b61616e74616e69732f636f64657261746f722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/kaantanis/coderator/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f5ff50c79171fac37b33cfbd2f24d5c682d402be751435c3fb397934946fadfc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6b61616e74616e69732f636f64657261746f722f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/kaantanis/coderator/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f8fb977afeb0d1f4a863da535ffb272f92184055175044f321acc690b3fea68a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61616e74616e69732f636f64657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kaantanis/coderator)

This package provides a simple unique code generator with optional configurations.

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

[](#installation)

You can install the package via composer:

```
composer require kaantanis/coderator
```

You can publish the config file with:

```
php artisan vendor:publish --tag="coderator-config"
```

This is the contents of the published config file:

```
return [
    'default_length' => 6,
];
```

Usage
-----

[](#usage)

```
$coderator = new \KaanTanis\Coderator\Coderator();

$my_code = $coderator->model(\App\Models\Product:class)
    ->field('code') // required. For create unique code
    ->prefix('#PR') // optional. default is empty
    ->length(6) // optional. except prefix, default is 6
    ->generate(); // returns a unique code
// $my_code = '#PRAY81QH'

// Without optional configurations
$my_code = $coderator->model(\App\Models\Product:class)
    ->field('code') // required. For create unique code
    ->generate(); // returns a unique code
// $my_code = '8EYQHG'

// Now you can use it this unique code for your model. E.g. Product model
Product::create([
    'code' => $my_code, // absolute unique code 8EYQHG
    ...
]);
```

Changelog
---------

[](#changelog)

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

Roadmap
-------

[](#roadmap)

- Suffix option
- Maybe created codes will be stored in a database table with a model and field name. So, it will be faster to generate a unique code.
- More tests
- More configurations
- More coffee

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)

- [KaanTanis](https://github.com/KaanTanis)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~151 days

Total

3

Last Release

1022d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64961969?v=4)[Kaan](/maintainers/kaantanis)[@KaanTanis](https://github.com/KaanTanis)

---

Top Contributors

[![KaanTanis](https://avatars.githubusercontent.com/u/64961969?v=4)](https://github.com/KaanTanis "KaanTanis (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

codegeneratorcoderatorlaravellaravelKaanTaniscoderator

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kaantanis-coderator/health.svg)

```
[![Health](https://phpackages.com/badges/kaantanis-coderator/health.svg)](https://phpackages.com/packages/kaantanis-coderator)
```

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)

PHPackages © 2026

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