PHPackages                             thuraaung2493/otp-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. thuraaung2493/otp-generator

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

thuraaung2493/otp-generator
===========================

A simple OTP generator.

04PHP

Since Sep 7Pushed 2mo ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

A Simple OTP Generator
======================

[](#a-simple-otp-generator)

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

[](#installation)

```
composer require thuraaung2493/otp-generator:dev-main
```

Usage
-----

[](#usage)

```
use Thuraaung\OtpGenerator\OtpGenerator;

$generator = new OtpGenerator();
$generator->generate(); // 123456
```

### Facade

[](#facade)

```
use Thuraaung\OtpGenerator\Facades\OtpGenerator;
use Thuraaung\OtpGenerator\Enums\CaseType;

OtpGenerator::generate(); // 123456
```

**Number Only**

```
use Thuraaung\OtpGenerator\Facades\OtpGenerator

OtpGenerator::generate(8); // "123456"
OtpGenerator::generate(8); // "12345678"
```

**English Alphabets Only**

```
use Thuraaung\OtpGenerator\Facades\OtpGenerator

OtpGenerator::generateAlpha(6, CaseType::MIXED); // "pHwmLh"
```

**Alpha Numeric**

```
use Thuraaung\OtpGenerator\Facades\OtpGenerator

OtpGenerator::generateAlphaNumeric(6, CaseType::MIXED); // "S3I3V1"
```

> Note: Uppercase only =&gt; `CaseType::UPPERCASE`, Lowercase only =&gt; `CaseType::LOWERCASE`, Mixed(default) =&gt; `CaseType::MIXED`

Test
----

[](#test)

```
  composer test
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance57

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6764acf86f328588b8b35a2e03683a19f42ed37d11dddb582256743c467d318f?d=identicon)[thuraaung2493](/maintainers/thuraaung2493)

---

Top Contributors

[![thuraaung2493](https://avatars.githubusercontent.com/u/22706964?v=4)](https://github.com/thuraaung2493 "thuraaung2493 (10 commits)")

### Embed Badge

![Health badge](/badges/thuraaung2493-otp-generator/health.svg)

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

###  Alternatives

[bakame/laravel-domain-parser

Laravel package to integrate PHP Domain parser.

26534.8k4](/packages/bakame-laravel-domain-parser)

PHPackages © 2026

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