PHPackages                             mahmut/coupon-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mahmut/coupon-generator

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

mahmut/coupon-generator
=======================

Coupon Code Generator

1.0.0(4y ago)0701↓75%GPL-2.0-onlyPHP

Since Oct 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mahmut/coupon-generator)[ Packagist](https://packagist.org/packages/mahmut/coupon-generator)[ RSS](/packages/mahmut-coupon-generator/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

PHP Coupon Code Generator
=========================

[](#php-coupon-code-generator)

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

[](#installation)

```
composer require mahmut/coupon-generator
```

Example
-------

[](#example)

```
$option = (new \Mahmut\CouponGenerator\Option\Option())
    ->setLength(10) // default is 10
    //->setPrefix('ABC-') // coupon prefix. ABC-XXXXX
    //->setSuffix('-XYZ') // coupon suffix XXXX-XYZ
    ->setUseLetters(true) // use letters. default is true
    ->setUseNumbers(true) // use numbers. default is true
    ->setUseSymbols(false) // use symbols. default is false
    ->setUseMixedCase(false); // use mixed cases. default is false
    // ->setMask('XXXXXX'); // coupon mask. length is ignores. default is null

$coupons = (new \Mahmut\CouponGenerator\CouponGenerator($option))
    ->setNumberOfCoupons(10) // number of coupons to be created
    ->generate()
    ->getCoupons();
```

Result
------

[](#result)

```
Array
(
    [0] => OND53E6MRM
    [1] => LS54Q5SWYM
    [2] => EFZDXHQ5RQ
    [3] => 8HBNTW50Q4
    [4] => YK9G6XRHMN
    [5] => ZY4NVMN08G
    [6] => 6T4ITO2YKU
    [7] => AADP4FGDI3
    [8] => J5U68IZJ22
    [9] => NCRA06AEGU
)
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

1727d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/67c281c6bd022892b09084c73a854145d7a4ccbcb1a06455b268c36a84f45cf5?d=identicon)[mahmutozdemir](/maintainers/mahmutozdemir)

### Embed Badge

![Health badge](/badges/mahmut-coupon-generator/health.svg)

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

###  Alternatives

[prezent/grid

Generic data grids and lists

1327.6k1](/packages/prezent-grid)

PHPackages © 2026

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