PHPackages                             ichtrojan/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. ichtrojan/laravel-otp

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

ichtrojan/laravel-otp
=====================

A simple package to generate and validate OTPs

v2.0.0(2y ago)268349.7k↓11.8%64[5 PRs](https://github.com/ichtrojan/laravel-otp/pulls)2MITPHP

Since Nov 20Pushed 1y ago8 watchersCompare

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

READMEChangelog (8)DependenciesVersions (11)Used By (2)

Laravel OTP ▲
=============

[](#laravel-otp-)

[![Latest Stable Version](https://camo.githubusercontent.com/59c11efd335378ab2222f3258efc30c818cb365464f0f3f8c583bdb1ffa13b4f/68747470733a2f2f706f7365722e707567782e6f72672f69636874726f6a616e2f6c61726176656c2d6f74702f762f737461626c65)](https://packagist.org/packages/ichtrojan/laravel-otp) [![Total Downloads](https://camo.githubusercontent.com/45bde397d192d1254fe36503be7f41e729e93be21f10363f87fd1d13eb00b81f/68747470733a2f2f706f7365722e707567782e6f72672f69636874726f6a616e2f6c61726176656c2d6f74702f646f776e6c6f616473)](https://packagist.org/packages/ichtrojan/laravel-otp) [![License](https://camo.githubusercontent.com/3536d0eb378c1180645027bebe8d0cfcac5cfc31d258dcd2ec862a40a7c71c09/68747470733a2f2f706f7365722e707567782e6f72672f69636874726f6a616e2f6c61726176656c2d6f74702f6c6963656e7365)](https://packagist.org/packages/ichtrojan/laravel-otp)

Introduction 🖖
--------------

[](#introduction-)

This is a simple package to generate and validate OTPs (One Time Passwords). This can be implemented mostly in Authentication.

Installation 💽
--------------

[](#installation-)

Install via composer

```
composer require ichtrojan/laravel-otp
```

Run Migrations

```
php artisan migrate
```

Usage 🧨
-------

[](#usage-)

> **NOTE**
> Response are returned as objects. You can access its attributes with the arrow operator (`->`)

### Generate OTP

[](#generate-otp)

```
