NNTmux /
newznab-tmux
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Mail; |
||
| 4 | |||
| 5 | use App\Models\User; |
||
| 6 | use Illuminate\Bus\Queueable; |
||
| 7 | use Illuminate\Mail\Mailable; |
||
| 8 | use Illuminate\Queue\SerializesModels; |
||
| 9 | |||
| 10 | class WelcomeEmail extends Mailable |
||
| 11 | { |
||
| 12 | use Queueable, SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 13 | |||
| 14 | /** |
||
| 15 | * @var User |
||
| 16 | */ |
||
| 17 | private $user; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var mixed |
||
| 21 | */ |
||
| 22 | private $siteEmail; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var mixed |
||
| 26 | */ |
||
| 27 | private $siteTitle; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Create a new message instance. |
||
| 31 | */ |
||
| 32 | public function __construct(User $user) |
||
| 33 | { |
||
| 34 | $this->user = $user; |
||
| 35 | $this->siteEmail = config('mail.from.address'); |
||
| 36 | $this->siteTitle = config('app.name'); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Build the message. |
||
| 41 | */ |
||
| 42 | public function build(): static |
||
| 43 | { |
||
| 44 | return $this->from($this->siteEmail)->subject('Welcome to '.$this->siteTitle)->view('emails.welcome')->with(['username' => $this->user->username, 'site' => $this->siteTitle]); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |