From 8030496e966755ca9d32ee8816b3db9fa60cd780 Mon Sep 17 00:00:00 2001 From: Baspa Date: Fri, 16 Aug 2024 13:07:16 +0200 Subject: [PATCH] Update README --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 96be508..c11de51 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,24 @@ class User extends Authenticatable implements FilamentUser } ``` +In case you're not using Laravel 11 yet, you will probably need to manually register the event listener in your `EventServiceProvider`: + +```php +use Laravel\Fortify\Events\TwoFactorAuthenticationEnabled; +use Laravel\Fortify\Events\TwoFactorAuthenticationChallenged; +use Vormkracht10\TwoFactorAuth\Listeners\SendTwoFactorCodeListener; + +// ... + +protected $listen = [ + TwoFactorAuthenticationChallenged::class => [ + SendTwoFactorCodeListener::class, + ], + TwoFactorAuthenticationEnabled::class => [ + SendTwoFactorCodeListener::class, + ], +]; +``` ## Usage