1. Go to this page and download the library: Download hamidmp/otp-manager library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
//routes/web.php
Route::middleware([\App\Http\Middleware\OTPManagerMiddleware::class])
->group(function () {
//OTP verification has passed completely
});
Route::middleware('\App\Http\Middleware\OTPManagerMiddleware:false')
->group(function () {
//OTP verification has passed its fist step at least (sending PIN code and having Token)
});