master

laravel/framework

Last updated at: 29/12/2023 09:20

PasswordReset.php

TLDR

This file contains the PasswordReset class, which is an event class in the Illuminate\Auth\Events namespace.

Classes

Class PasswordReset

The PasswordReset class is an event class that is used to represent a password reset event. It implements the SerializesModels trait. It has the following properties and methods:

Properties

  • $user: This is a public property that represents the user who initiated the password reset. It is an instance of the Illuminate\Contracts\Auth\Authenticatable interface.

Methods

  • __construct($user): This is the constructor method of the PasswordReset class. It accepts a $user parameter which represents the user who initiated the password reset. When a new instance of the PasswordReset class is created, the $user property is set to the given $user parameter value.
<?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;
    }
}