PHPackages                             elysiumrealms/laravel-otp - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. elysiumrealms/laravel-otp

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

elysiumrealms/laravel-otp
=========================

A package to generate and validate OTP

1.2.1(1y ago)0391MITBladePHP &gt;=7.1.0

Since Feb 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/elysiumrealms/laravel-otp)[ Packagist](https://packagist.org/packages/elysiumrealms/laravel-otp)[ Docs](https://github.com/elysiumrealms/laravel-otp)[ RSS](/packages/elysiumrealms-laravel-otp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

OTP Verification System
=======================

[](#otp-verification-system)

A module for generating and verifying OTPs.

Installation Guide
------------------

[](#installation-guide)

Install the package using Composer.

```
composer require elysiumrealms/laravel-otp
```

Publish the assets.

```
php artisan vendor:publish --tag=otp-assets
```

Run the migrations.

```
php artisan migrate
```

Implementation Guide
--------------------

[](#implementation-guide)

Schedule the `otp:clean` command to clean expired OTPs.

```
function schedule(Schedule $schedule)
{
    $schedule->command('otp:clean')
        ->onOneServer()
        ->everyFiveMinutes();
}
```

Usage Guide
-----------

[](#usage-guide)

Generate an for a mobile number.

```
curl -X POST http://localhost:8000/api/v1/otp/sms/generate \
    -H "Content-Type: application/json"
    -d '{"identifier": "1234567890"}'
```

Generate an OTP for an email address.

```
curl -X POST http://localhost:8000/api/v1/otp/mail/generate \
    -H "Content-Type: application/json"
    -d '{"identifier": "test@example.com"}'
```

Verify an OTP.

```
curl -X POST http://localhost:8000/api/v1/otp/validate \
    -H "Content-Type: application/json"
    -d '{"identifier": "1234567890", "token": "123456"}'
```

Verify an OTP for an email address.

```
curl -X POST http://localhost:8000/api/v1/otp/email/validate \
    -H "Content-Type: application/json"
    -d '{"identifier": "test@example.com", "token": "123456"}'
```

Check if identifier is verified with validator.

```
public function __invoke(Request $request)
{
    $request->validate([
        'identifier' => 'required|otp_verified',
    ]);
}
```

Check if identifier is verified.

```
if (\Elysiumrealms\Otp\Facades\Otp::verified('1234567890'))
    echo 'Identifier is verified';
```

For further details, please contact the development team.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance45

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

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.

###  Release Activity

Cadence

Every ~3 days

Total

4

Last Release

430d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4023f1cff0b6485985efd20bb82d44644dbbe6e58729900611e941000e3eb0bd?d=identicon)[deflinhec](/maintainers/deflinhec)

---

Top Contributors

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

---

Tags

laravelotpAuthenticationone-time-password

### Embed Badge

![Health badge](/badges/elysiumrealms-laravel-otp/health.svg)

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

###  Alternatives

[salehhashemi/laravel-otp-manager

Laravel OTP manager

18713.2k](/packages/salehhashemi-laravel-otp-manager)[lakm/nopass

Provides passwordless authentication for your laravel projects.

2213.6k2](/packages/lakm-nopass)[remotemerge/totp-php

Lightweight, fast, and secure TOTP (2FA) authentication library for PHP — battle tested, dependency free, and ready for enterprise integration.

2010.2k](/packages/remotemerge-totp-php)

PHPackages © 2026

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