An open API service indexing awesome lists of open source software.

https://github.com/turahe/laravel-otp


https://github.com/turahe/laravel-otp

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# Laravel OTP โ–ฒ

## Introduction ๐Ÿ––

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

## Installation ๐Ÿ’ฝ

Install via composer

```bash
composer require turahe/otp
```

Add service provider to the `config/app.php` file

```php
[
...
Turahe\Otp\OtpServiceProvider::class,
];
...
```

Add alias to the `config/app.php` file

```php
[
...
'Token' => Turahe\Otp\Otp::class,
];
...
```

Run Migrations

```bash
php artisan migrate
```

## Usage ๐Ÿงจ

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

### Generate OTP

```php
command('otp:clean')->daily();
}
```

## Contribution

If you find an issue with this package or you have any suggestion please help out. I am not perfect.