mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
42 lines
952 B
PHP
42 lines
952 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\Settings;
|
|
use App\Models\User;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class ForgottenPassword extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public $user;
|
|
|
|
public $resetLink;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @param $userId
|
|
* @param $newPass
|
|
*/
|
|
public function __construct($userId, $resetLink)
|
|
{
|
|
$this->user = User::query()->where('id', $userId)->first();
|
|
$this->resetLink = $resetLink;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return $this
|
|
* @throws \Exception
|
|
*/
|
|
public function build()
|
|
{
|
|
return $this->from(Settings::settingValue('site.main.email'))->subject('Forgotten password reset')->view('emails.forgottenPassword')->with(['resetLink' => $this->resetLink, 'site' => Settings::settingValue('site.main.title'),]);
|
|
}
|
|
}
|