Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ligonsker's avatar

What is the use of PasswordReset Event when using Breeze?

When resseting password with Breeze, it dispatches the PasswordReset event:

event(new PasswordReset($user));:

<?php

namespace Illuminate\Auth\Events;

use Illuminate\Queue\SerializesModels;

class PasswordReset
{
    use SerializesModels;

    /**
     * The user.
     *
     * @var \Illuminate\Contracts\Auth\Authenticatable
     */
    public $user;

    /**
     * Create a new event instance.
     *
     * @param  \Illuminate\Contracts\Auth\Authenticatable  $user
     * @return void
     */
    public function __construct($user)
    {
        $this->user = $user;
    }
}

What is the use for it?

0 likes
2 replies
krs's avatar
krs
Best Answer
Level 17

Hi @ligonsker , that's quite simple... your application can listen to that event.

Maybe you want to notify an admin, or you want to send the user a confirmation email or something like that...

1 like
Ligonsker's avatar

@krs thanks! I just thought that Breeze also uses this event for something by default but just couldn't see what. I thought Breeze was supposed to send a "password changed" email when a user changed his password but nothing happened so I wasn't sure if something wasn't working properly or it's just there for future usage

Please or to participate in this conversation.