1. Go to this page and download the library: Download lakshmajim/uniquecode 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/ */
use UniqueCode;
UniqueCode::OTP(otp_length, otp_charcaters_domain)
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use UniqueCode;
/**
* UniqueCode - Package usage Example
*
* @access public
* @since 1.2.0
* @author lakshmaji
*/
class UniqueCodeTest extends Controller
{
public function testGetOtp()
{
$code = UniqueCode::OTP(3,'abc45');
echo $code; //This will outputs a4c or 5b2 or ac4 etc
}
}
// end of class UniqueCodeTest
// end of file UniqueCodeTest.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.