65 lines
1.3 KiB
PHP
65 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\User\Mail;
|
|
|
|
use App\User;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class WelcomeMail extends Mailable implements ShouldQueue
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public string $resetUrl;
|
|
public string $home;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct(public User $user, public string $token)
|
|
{
|
|
$this->resetUrl = route('password.reset', ['token' => $token, 'email' => $user->email]);
|
|
$this->home = url('');
|
|
}
|
|
|
|
/**
|
|
* Get the message envelope.
|
|
*
|
|
* @return \Illuminate\Mail\Mailables\Envelope
|
|
*/
|
|
public function envelope()
|
|
{
|
|
return new Envelope(
|
|
subject: 'Willkommen bei Adrema',
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the message content definition.
|
|
*
|
|
* @return \Illuminate\Mail\Mailables\Content
|
|
*/
|
|
public function content()
|
|
{
|
|
return new Content(
|
|
markdown: 'mail.user.welcome',
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the attachments for the message.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function attachments()
|
|
{
|
|
return [];
|
|
}
|
|
}
|