PHP code example of adeshsuryan / laravel-otp-login

1. Go to this page and download the library: Download adeshsuryan/laravel-otp-login 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/ */

    

adeshsuryan / laravel-otp-login example snippets


use adeshsuryan\LaravelOTPLogin\OneTimePassword;

$otp = OneTimePassword::create([
    'user_id' => $user->id,
    'status' => 'waiting',
]);
$otp->send($user);
// redirect to route('otp.view')
bash
composer vendor:publish --tag=otp-config
php artisan migrate