movie-night-nuevo/app/Mail/PasswordResetNewUser.php

60 lines
1.2 KiB
PHP
Raw Normal View History

2025-12-12 23:07:04 -06:00
<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Password;
use Laravel\Fortify\Fortify;
class PasswordResetNewUser extends Mailable
{
use Queueable, SerializesModels;
public string $token;
/**
* Create a new message instance.
*/
public function __construct(private User $user)
{
$this->token = Password::createToken($this->user);
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Welcome to Movie Night!',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'mail.password-reset-new-user',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, Attachment>
*/
public function attachments(): array
{
return [];
}
}