I've followed the instructions listed in the docs for email verification. My user model implements the MustVerifyEmail interface, and I'm firing the event in my controller after creating the user. I've also verified that I can send a random email via Tinker, which works and comes through in Mailhog.
I've created a test route in my UserController that should fire the event, but it is seemingly not getting fired:
public function test()
{
Log::debug('testing email');
$user = User::find(1);
Log::debug($user);
event(new Registered($user));
Log::debug('event should have fired');
}
In EventServiceProvider.php:
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
];
In my User model:
namespace App\Models;
use Laravel\Sanctum\HasApiTokens;
use Laravel\Jetstream\HasProfilePhoto;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\SoftDeletes;
use Laravel\Fortify\TwoFactorAuthenticatable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
class User extends Authenticatable implements MustVerifyEmail
{
...
It's writing to the log as expected, but there's no email. I don't think I'm missing any steps from the docs, and I'm unsure of how to troubleshoot. How can I debug events, or what am I missing in my implementation?