In my User model I can do:
public function sendPasswordResetNotification($token)
{
$message = (new UserForgotPassword($this->email, $this->name, $token));
}
but how can I pass the full User object?
public function sendPasswordResetNotification($token)
{
$message = (new UserForgotPassword($user, $token));
}
Using $user doesn't work, while it does work in:
protected static function booted()
{
static::creating(function ($user) {
$user->uuid = Str::uuid();
});
}