File: /mnt/data/ghayatcom/ghayatcom-api/app/Jobs/PaymentBlockedNotificationJob.php
<?php
namespace App\Jobs;
use App\Mail\SendEmailNotification;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Mail;
use App\Helpers\GeneralHelper;
class PaymentBlockedNotificationJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* The number of times the job may be attempted.
*
* @var int
*/
// public $tries = 3;
/**
* The number of seconds the job can run before timing out.
*
* @var int
*/
// public $timeout = 20;
/**
* Create a new job instance.
*
* @return void
*/
public $details;
public function __construct($details)
{
$this->details = $details;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Set mail configuration
GeneralHelper::setMailConfig();
Mail::to($this->details['email'])->send(new SendEmailNotification($this->details));
}
}