Files
newznab-tmux/app/Jobs/SendPasswordResetEmail.php
T
DariusIII c33db34c49 Apply fixes from StyleCI
[ci skip] [skip ci]
2021-09-13 20:01:06 +00:00

49 lines
997 B
PHP

<?php
namespace App\Jobs;
use App\Mail\PasswordReset;
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 \App\Models\User
*/
private $user;
/**
* @var string
*/
private $newPass;
/**
* Create a new job instance.
*
* @param \App\Models\User $user
* @param string $newPass
*/
public function __construct($user, $newPass)
{
$this->user = $user;
$this->newPass = $newPass;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Mail::to($this->user->email)->send(new PasswordReset($this->user, $this->newPass));
}
}