mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
42 lines
993 B
PHP
42 lines
993 B
PHP
<?php
|
|
|
|
namespace App\Classes\Jobs;
|
|
|
|
use App\Classes\Notifications\UserVerificationEmail;
|
|
use App\Models\User;
|
|
use App\Models\UserEmailVerification;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class SendUserVerificationEmail implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
|
|
/** @var User */
|
|
private $user;
|
|
|
|
/** @var UserEmailVerification */
|
|
private $attempt;
|
|
|
|
/**
|
|
* SendUserVerificationEmail constructor.
|
|
* @param User $user
|
|
* @param UserEmailVerification $attempt
|
|
*/
|
|
public function __construct(User $user, UserEmailVerification $attempt)
|
|
{
|
|
$this->user = $user;
|
|
$this->attempt = $attempt;
|
|
}
|
|
|
|
|
|
public function handle()
|
|
{
|
|
$this->user->notify(new UserVerificationEmail($this->user, $this->attempt));
|
|
}
|
|
}
|