ehsansabet / laravel-otp

This package allows you to send otp in laravel projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DEPRECATED! Please check MessageWay

DEPRECATED


gsOTP

LaravelOTP

Latest Version on Packagist Total Downloads

فارسی

Send OTP for one-time password and mobile number verification code from various SMS, voicemail, messaging, and smart hybrid channels. This package allows you to connect to gsOTP.com server from your laravel applications.

Installation

Via Composer

$ composer require globalsmartotp/laravel-otp

#Or if using Laravel Sail
$ sail composer require globalsmartotp/laravel-otp

Publish

$ php artisan vendor:publish --tag=laravel-otp.config

#Or if using Laravel Sail
$ sail artisan vendor:publish --tag=laravel-otp.config

Usage

ApiKey

Please register on gsOTP.com and get apiKey

Environment

Please add environment on .env file

GS_OTP_API_KEY=''
GS_OTP_SEND_METHOD=sms
GS_OTP_TEMPLATE_ID=3

Send OTP

$referenceID = LaravelOTP::send($mobile);

Status

$status = LaravelOTP::status($referenceID);

Verify

$verify = LaravelOTP::verify($mobile, $otp);

License

MIT.

About

This package allows you to send otp in laravel projects.


Languages

Language:PHP 100.0%