https://github.com/turahe/laravel-otp
https://github.com/turahe/laravel-otp
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/turahe/laravel-otp
- Owner: turahe
- Created: 2022-07-04T17:33:28.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-08T00:17:09.000Z (over 1 year ago)
- Last Synced: 2025-01-14T14:54:50.439Z (5 months ago)
- Language: PHP
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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.