PHP code example of ziming / laravel-zxcvbn

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

    

ziming / laravel-zxcvbn example snippets




return [
    // If you wish to override the default min score in the config,
    // you can do so by passing in a second argument to the ZxcvbnRule constructor.
    // e.g. new ZxcvbnRule([], 4)
    'min_score' => env('ZXCVBN_MIN_SCORE', 3),
];

// In your validation rules
use Illuminate\Validation\Rules\Password;
use Ziming\LaravelZxcvbn\Rules\ZxcvbnRule;

[
    'name' => ['xcvbnRule([
            request('email'),
            request('name'),
        ]),
    ],
]


## Testing

bash
php artisan vendor:publish --tag="zxcvbn-config"