1. Go to this page and download the library: Download itsmurumba/laravel-otp 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/ */
itsmurumba / laravel-otp example snippets
use Itsmurumba\Otp\Facades\Otp;
// Generate and send an OTP (defaults to the "sms" channel)
$otp = Otp::generateAndSend('[email protected]', 'email');
// Verify an OTP
$isValid = Otp::verify('[email protected]', $otp);