PHP code example of square1 / pwned-check-laravel
1. Go to this page and download the library: Download square1/pwned-check-laravel 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/ */
square1 / pwned-check-laravel example snippets
'providers' => array(
// ...
Square1\Laravel\PwnedCheck\Providers\PwnedCheckServiceProvider::class,
)
php artisan vendor:publish --provider="Square1\Laravel\PwnedCheck\Providers\PwnedCheckServiceProvider" --tag=config
php
// RegisteredUserController.php
public function store(Request $request)
{
$request->validate([
'name' => ['Rules\Password::defaults(), 'pwned'],
]);
// ...
// Reject any password that has appeared in the list of compromised ones more than ten times
'password' => ['