mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
47 lines
945 B
PHP
47 lines
945 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Mail\PasswordReset;
|
|
use App\Models\User;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use Illuminate\Support\Facades\Mail;
|
|
|
|
class SendPasswordResetEmail implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
/**
|
|
* @var User
|
|
*/
|
|
private $user;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $newPass;
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*/
|
|
public function __construct(User $user, string $newPass)
|
|
{
|
|
$this->user = $user;
|
|
$this->newPass = $newPass;
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*/
|
|
public function handle(): void
|
|
{
|
|
Mail::to($this->user->email)->send(new PasswordReset($this->user, $this->newPass));
|
|
}
|
|
}
|