phpvms/app/Mail/UserRejected.php

29 lines
623 B
PHP
Raw Normal View History

<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class UserRejected extends Mailable
{
use Queueable, SerializesModels;
2017-12-30 06:56:46 +08:00
public $subject, $user;
public function __construct(User $user, $subject = null)
{
$this->subject = $subject ?: 'Your registration has been denied';
$this->user = $user;
}
public function build()
{
return $this
->markdown('emails.user.rejected')
->subject($this->subject)
->with(['user' => $this->user]);
}
}