I set up a user registration in Laravel 8, with the help of Fortify.
I works pretty much as I expected, except that I would like to trigger a specific action when a user clicks the verification link. (When verification succeeded, that is.)
I know I can specify a redirection url through the home
parameter in config/fortify.php
, but this also applies to regular sign-in action. I would like something specific to email verification.
Any idea how I could at least check if the email has just been verified ?
You have to Listen to an event, that way you can know when someone got verified and do something.
This is the source code, so you can see it is dispatching event(new Verified($request->user()));
, so you have to listen to Illuminate\Auth\Events\Verified
event.