PHP code example of zenepay / password-expiry

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

    

zenepay / password-expiry example snippets


return [

      'expiry_days' => 90
];


use Zenepay\PasswordExpiry\Traits\PasswordExpirable;

class User extends Authenticatable {
    use PasswordExpirable;
}

use Zenepay\PasswordExpiry\CheckPasswordExpired;

protected $routeMiddleware = [
    ...
    'check-password-expired' => CheckPasswordExpired::class
]

use Zenepay\PasswordExpiry\CheckPasswordExpired;

->withMiddleware(function (Middleware $middleware) {
     $middleware->append(CheckPasswordExpired::class);
})


use Zenepay\PasswordExpiry\CheckPasswordExpired;

   $panel->authMiddleware([
        ...,
        CheckPasswordExpired::class
    ])

use Zenepay\PasswordExpiry\Rules\NoPreviousPassword;

    public function store(Request $request): RedirectResponse
    {
        $request->validate([
            ...
            'password' => ['

use Jeffgreco13\FilamentBreezy\BreezyCore;
use Zenepay\PasswordExpiry\Rules\NoPreviousPassword;
    $panel->plugins([
        BreezyCore::make()
        ->passwordUpdateRules(
            rules: [Password::default()->mixedCase()->uncompromised(3),NoPreviousPassword::ofUser(Auth::user())],
            
bash
php artisan migrate
bash
php artisan vendor:publish --provider="Zenepay\PasswordExpiry\PasswordExpiryServiceProvider" --tag="config"
 php
$user->isPasswordExpired();