mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
39 lines
872 B
PHP
39 lines
872 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Mail\ForgottenPassword;
|
|
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 SendPasswordForgottenEmail implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
private string $resetLink;
|
|
|
|
private User $user;
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*/
|
|
public function __construct(User $user, string $resetLink)
|
|
{
|
|
$this->user = $user;
|
|
$this->resetLink = $resetLink;
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*/
|
|
public function handle(): void
|
|
{
|
|
Mail::to($this->user->email)->send(new ForgottenPassword($this->resetLink));
|
|
}
|
|
}
|