PHP code example of inventas / laravel-password-compliance

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

    

inventas / laravel-password-compliance example snippets


return [
];

return [
    'redirect_route' => 'password.change',
    'redirect_url' => '/password/change',
    'exempt_routes' => ['password.change'],
    'guard' => null,
];

use Inventas\PasswordCompliance\Traits\RequiresPasswordChange;

class User extends Authenticatable
{
    use RequiresPasswordChange;
}

use Inventas\PasswordCompliance\Facades\PasswordCompliance;

// orced reset');

// swordCompliance::clearRequirement($user);

Route::middleware(['auth', 'password.compliance'])->group(function () {
    // protected routes
});
bash
php artisan vendor:publish --tag="password-compliance-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="password-compliance-config"
bash
php artisan vendor:publish --tag="password-compliance-views"