45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Mail\Pemenang;
|
|
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 HantarMail implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
public $user_email;
|
|
|
|
public $user_name;
|
|
|
|
protected $total_bid_win_converted;
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct($user_email, $user_name, $total_bid_win_converted)
|
|
{
|
|
$this->user_email = $user_email;
|
|
$this->user_name = $user_name;
|
|
$this->total_bid_win_converted = $total_bid_win_converted;
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function handle()
|
|
{
|
|
Mail::to($this->user_email)->send(new Pemenang($this->user_name, $this->total_bid_win_converted));
|
|
}
|
|
}
|