Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lakshmaji/otp
This package is used to generate one-time password [ a random string or number]
https://github.com/lakshmaji/otp
composer laravel otp php
Last synced: 10 days ago
JSON representation
This package is used to generate one-time password [ a random string or number]
- Host: GitHub
- URL: https://github.com/lakshmaji/otp
- Owner: lakshmaji
- Created: 2016-04-21T10:25:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T11:11:28.000Z (over 3 years ago)
- Last Synced: 2024-10-10T05:36:38.196Z (27 days ago)
- Topics: composer, laravel, otp, php
- Language: PHP
- Size: 440 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel - UniqueCode
[Wiki on web](http://lakshmaji.github.io/otp/)##WHAT IT IS?
- This package is used to generate one-time password [ a random string or number]
---
##INSTALLATION
- Download package form https://github.com/lakshmaji/otp .
- OR YOU CAN RUN FOLLOWING COMMAND FROM TERMINAL
- With composer you can run this line **composer require lakshmaji/uniquecode**Run this command from the Terminal:
```bash
composer require lakshmaji/uniquecode
composer update
```***
##LARAVEL INTEGRATION
you need to add the service provider. Open `app/config/app.php`, and add a new item to the providers array.
```php
Lakshmaji\UniqueCode\UniqueCodeServiceProvider::class,
```
Then, add a Facade for more convenient usage. In `app/config/app.php` add the following line to the `aliases` array:
```php
'UniqueCode'=> Lakshmaji\UniqueCode\Facade\UniqueCode::class,
```
Again do composer update***
## METHOD, AVAILABLE PARAMETERS AND RESPONSES
#####Method
```php
OTP(integer, string)
``````php
use UniqueCode;UniqueCode::OTP(otp_length, otp_charcaters_domain)
```##### The message_array parameters
| PARAMETER | DESCRIPTION |
|:-------------- |:----------------------------------------|
|otp_length | This defines the **length of the random string** generated as out put |
|otp_charcaters_domain| This defines the range of charcters taken to generate random string i.e, otp or verification code |
##Generating OTP or verification code
```php