Update job for notis peringatan kedua

This commit is contained in:
Amir
2023-05-24 13:10:54 +08:00
parent 0a08a4bcd6
commit 7d99167ad8
2 changed files with 10 additions and 12 deletions
@@ -20,10 +20,12 @@ use Illuminate\Support\Facades\Http;
use App\Models\CawanganNotis;
use Illuminate\Support\Facades\Artisan;
class SendWabot implements ShouldQueue
class WhatsappNotisPeringatanKedua implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $user_id;
protected $user_kodcaw;
protected $notisid;
protected $cawid;
@@ -32,8 +34,10 @@ class SendWabot implements ShouldQueue
*
* @return void
*/
public function __construct($notisid,$cawid)
public function __construct($user_id, $user_kodcaw, $notisid,$cawid)
{
$this->user_id = $user_id;
$this->user_kodcaw = $user_kodcaw;
$this->notisid = $notisid;
$this->cawid = $cawid;
}
@@ -152,8 +156,6 @@ Sekian, terima kasih.';
}
// dd($message);
// $message = 'Hello%20Nadine%0Ahow%20are%20you%0A';
$response = Http::get(env('WABOT_API'), [
'number' => $mobile_no,
'type' => 'text',
@@ -162,13 +164,9 @@ Sekian, terima kasih.';
'access_token' => env('WABOT_TOKEN_KEYS')
]);
Log::info($response);
Log::info("WABOT " . $response);
}
// dd($suratnotis['data_notisbid'][$index]);
sleep(2);
}
// $updatestatus = CawanganNotis::where('notis_id', '=', $this->notisid)->where('caw_id', '=', $this->cawid)->first();
// $updatestatus->status = '3'; //blastwabot
// $updatestatus->save();
}
}