⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
15.204.235.159
Server:
Linux srv.techlup.co.ke 4.18.0-553.5.1.el8_10.x86_64 #1 SMP Wed Jun 5 09:12:13 EDT 2024 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
tech
/
rider.techlup.co.ke
/
admin
/
app
/
Jobs
/
View File Name :
SendPushNotificationForAllUserJob.php
<?php namespace App\Jobs; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; class SendPushNotificationForAllUserJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; /** * Create a new job instance. */ public function __construct( protected $notification, protected $notify = null) { } /** * Execute the job. * * @return void */ public function handle() { if ($this->notify) { foreach ($this->notify as $user) { sendDeviceNotification( fcm_token: $user->fcm_token, title: $this->notification['title'], description: $this->notification['description'], status: $this->notification['status'] ?? 0, image: $this->notification['image'] ?? null, ride_request_id: $this->notification['ride_request_id'] ?? null, type: $this->notification['type'] ?? null, action: $this->notification['action'] ?? null, user_id: $user->id ?? null, ); } } else { foreach ($this->notification['user'] as $user) { sendDeviceNotification( fcm_token: $user['fcm_token'], title: $this->notification['title'], description: $this->notification['description'], status: $this->notification['status'] ?? 0, image: $this->notification['image'] ?? null, ride_request_id: $this->notification['ride_request_id'] ?? null, type: $this->notification['type'] ?? null, action: $this->notification['action'] ?? null, user_id: $user['user_id'] ?? null, ); } } } }