PHP code example of lakm / nopass

1. Go to this page and download the library: Download lakm/nopass 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/ */

    

lakm / nopass example snippets


    use LakM\NoPass\Facades\NoPass;
    
    $data = [];
    
    $link = NoPass::for($user)
        ->email()
        ->routeName('login-link')
        ->generate($data); // Data are attached to query string

    use LakM\NoPass\Facades\NoPass;
    
    $link = NoPass::for($user)
        ->otp()
        ->generate();

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->isValid();

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->isValid($otp);

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->inValidate();