Download the PHP package nealyip/laravel-otp-validation without Composer

On this page you can find all versions of the php package nealyip/laravel-otp-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-otp-validation

Description

The packages handle otp in various way for you. It is designed for modal dialog and called by ajax.

Install

Add this provider to config/app.php

Publish config

Configuration

You may translate error message under resources/lang/vendor/otp_messages

By default it use log transport service, you may change it to the given mail service or write your own sms provider.

For the given mail service, simply change config/otp_validation.php

for the default mail transport class, define your mail driver, from address and name (MAIL_FROM_ADDRESS and MAIL_FROM_NAME for smtp)

OTP_SEED you can change the seed for otp by changing OTP_SEED env
check otp_validation.php for more details

Development

To implement your own transport interface, simply implement the Nealyip\LaravelOTPValidation\Transport\TransportInterface interface. for example,

and change your config file (config/otp_validation.php)

How to use

First you are required to implement Nealyip\LaravelOTPValidation\OTP\OTPTarget to your user model. Implement the target user mobile number and email address functions for otp transportation.

Add routes for password attempt and resend request

To send the first otp, just call the send method from the OTPValidationService

And you may build a modal dialog from the client side and ask for the password.

To attempt a password, just call the routes, for example

to request resend

if the otp is correct it will return a success response with HTTP status code 200

you can then consume the otp


All versions of laravel-otp-validation with dependencies

PHP Build Version
Package Version
Requires php Version >=7
illuminate/support Version ~5.4.0
illuminate/cache Version ~5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nealyip/laravel-otp-validation contains the following files

Loading the files please wait ....