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 PasswordReset 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 string |
||
| 21 | */ |
||
| 22 | private $newPass; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var mixed |
||
| 26 | */ |
||
| 27 | private $siteEmail; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var mixed |
||
| 31 | */ |
||
| 32 | private $siteTitle; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * PasswordReset constructor. |
||
| 36 | */ |
||
| 37 | public function __construct(User $user, $newPass) |
||
| 38 | { |
||
| 39 | $this->user = $user; |
||
| 40 | $this->newPass = $newPass; |
||
| 41 | $this->siteEmail = config('mail.from.address'); |
||
| 42 | $this->siteTitle = config('app.name'); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Build the message. |
||
| 47 | * |
||
| 48 | * |
||
| 49 | * @throws \Exception |
||
| 50 | */ |
||
| 51 | public function build(): static |
||
| 52 | { |
||
| 53 | return $this->from($this->siteEmail)->subject('Password reset')->view('emails.passwordReset')->with(['newPass' => $this->newPass, 'userName' => $this->user->username, 'site' => $this->siteTitle]); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |