PHP code example of effectix / passwordchecker

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

    

effectix / passwordchecker example snippets


//...
$validated = $this->validate([
            'name' => ['email', 'max:255', 'unique:'.User::class],
            'password' => ['

public int $score = 0;

public function updated($prop): void
{
    if($prop === 'password') {
        $this->score = PasswordScorer::calculate($this->password);
    }
}