PHP code example of bbs-lab / nova-password-rotation
1. Go to this page and download the library: Download bbs-lab/nova-password-rotation 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/ */
bbs-lab / nova-password-rotation example snippets
use BBSLab\LaravelPasswordRotation\Concerns\RotatesPassword;
use BBSLab\LaravelPasswordRotation\Contracts\MustRotatePassword;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements MustRotatePassword
{
use RotatesPassword;
}
use BBSLab\LaravelPasswordRotation\Rules\PasswordNotReused;
$request->validate([
'password' => ['
use BBSLab\LaravelPasswordRotation\Events\PasswordRotated;
use Illuminate\Support\Facades\Event;
Event::listen(function (PasswordRotated $event) {
logger()->info('Password rotated', ['user' => $event->authenticatable->getKey()]);
});
use BBSLab\NovaPasswordRotation\Http\Middleware\EnsurePasswordIsNotExpired;
'middleware' => [
// ...Nova's default web middleware...
EnsurePasswordIsNotExpired::class,
],
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.