diff --git a/README.md b/README.md index 6ea9e97..630e925 100644 --- a/README.md +++ b/README.md @@ -159,3 +159,42 @@ class User extends Authenticatable ... } ``` +9) MMiddleware + +Para validação das rotas com a data de validação das senhas, adicione o middleware: + +- Versão 10.*: +```app\Http\Kernel.php``` +```php +protected $routeMiddleware = [ + ... + \Pablo\Ae3auth\app\Http\InvalidPasswordMiddleware::class, +]; +``` + +- Versão 11.* +```bootstrap/app.php``` + +```php +withRouting( + web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', + health: '/up', + ) + ->withMiddleware(function (Middleware $middleware) { + $middleware->alias([ + 'auth.invalid-password' => \Pablo\Ae3auth\app\Http\InvalidPasswordMiddleware::class, + ]); + }) + ->withExceptions(function (Exceptions $exceptions) { + // + })->create(); +``` \ No newline at end of file