/home/techb158/ileadtechnology.com/SSM/app/Jobs
Edit: /home/techb158/ileadtechnology.com/SSM/app/Jobs/SendPushNotification.php (1417B)
data = $data;
}
/**
* Execute the job.
*
* @return void
*/
public function handle(ConfigurationRepository $config, PushNotificationRepository $push_notification)
{
$config->setDefault();
$tokens = gv($this->data, 'tokens', []);
foreach (array_chunk($tokens, config('config.max_push_notification_per_chunk')) as $chunk) {
$push_notification->send([
'pusher_auth_token' => gv($this->data, 'pusher_auth_token'),
'title' => gv($this->data, 'title'),
'body' => gv($this->data, 'body'),
'tokens' => $chunk,
'url' => gv($this->data, 'url')
]);
}
}
}