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