PHPackages                             tech-ed/simpl-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. tech-ed/simpl-otp

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

tech-ed/simpl-otp
=================

A simple and lightweight Laravel package for generating and verifying one-time passwords (OTPs), enhancing authentication security in your Laravel applications.

v1.0.2(7mo ago)1649MITPHPPHP ^8.2

Since Apr 19Pushed 5mo ago2 watchersCompare

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

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

SimplOtp
========

[](#simplotp)

A Laravel package for simple OTP generation and validation with built-in Blade frontend scaffolding.

Features
--------

[](#features)

- Generate and validate OTPs
- Ready-to-use Blade views
- Email notification support
- Configurable settings
- Easy integration

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require tech-ed/simpl-otp
php artisan migrate
```

### Basic Usage

[](#basic-usage)

```
use TechEd\SimplOtp\SimplOtp;

// Generate OTP
$otp = SimplOtp::generate('user@example.com');

// Validate OTP
$result = SimplOtp::validate('user@example.com', '1234');
```

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --provider="TechEd\SimplOtp\SimplOtpServiceProvider" --tag="config"
```

Configure OTP settings in `config/simplotp.php`:

```
return [
    'otp' => [
        'length' => 4,           // OTP length
        'type' => 'numeric',     // 'numeric' or 'alphanumeric'
        'validity' => 15,        // Validity in minutes
    ],
    'success_messages' => [
        'otp_generated' => 'OTP generated',
        'otp_valid' => 'OTP is valid',
    ],
    'error_messages' => [
        'expired_otp' => 'OTP Expired',
        'invalid_otp' => 'Invalid OTP',
        'otp_not_found' => 'OTP not found',
    ]
];
```

Frontend Views
--------------

[](#frontend-views)

### Setup

[](#setup)

```
php artisan simplotp:publish-frontend
```

### Routes

[](#routes)

- Generate OTP: `/simplotp/generate`
- Verify OTP: `/simplotp/verify`

### Using in Your Controllers

[](#using-in-your-controllers)

```
return view('simplotp::generate');
return view('simplotp::verify');
```

### Customization

[](#customization)

The views are published to `resources/views/vendor/simplotp/` and include Bootstrap styling. You can customize them to match your application's design.

Email Notifications
-------------------

[](#email-notifications)

### Publish Email Template

[](#publish-email-template)

```
php artisan vendor:publish --provider="TechEd\SimplOtp\SimplOtpServiceProvider" --tag="email"
```

### Send OTP via Email

[](#send-otp-via-email)

```
use TechEd\SimplOtp\SimplOtp;
use TechEd\SimplOtp\EmailOtpVerification;

$user = auth()->user();
$otp = SimplOtp::generate($user->email);

if ($otp->status === true) {
    $user->notify(new EmailOtpVerification($otp->token));
}
```

Support
-------

[](#support)

If SimplOtp has been helpful to you and you'd like to support its development, consider buying the developer a cup of coffee! ☕

Your support is greatly appreciated and helps in maintaining and improving SimplOtp for the Laravel community.

[!["Buy Me A Coffee"](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://buymeacoffee.com/edmonbelchev)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance67

Regular maintenance activity

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~273 days

Total

3

Last Release

211d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/387d9a8a826cd0910d1b10101aab647bbeb7ce7b89f1dd156d778d2a6acb17bb?d=identicon)[tech-ed](/maintainers/tech-ed)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tech-ed-simpl-otp/health.svg)

```
[![Health](https://phpackages.com/badges/tech-ed-simpl-otp/health.svg)](https://phpackages.com/packages/tech-ed-simpl-otp)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[overtrue/laravel-follow

User follow unfollow system for Laravel.

1.2k404.7k5](/packages/overtrue-laravel-follow)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)

PHPackages © 2026

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