journal-intime/app/Mail/WelcomeMail.php

38 lines
671 B
PHP
Raw Normal View History

2019-09-25 15:25:22 +02:00
<?php
namespace App\Mail;
use App\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class WelcomeMail extends Mailable
{
use Queueable, SerializesModels;
/** @var \App\User */
private $user;
/**
* Create a new message instance.
*
* @param \App\User $user
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('emails.welcome', ['user' => $this->user]);
}
}