$this->addempexpdays($bowner_update->idealvideo_key,'30'); $jobs_update = Job::where('vha_job', '1') ->where('postedby', $transaction->bid) ->update(['status' => '3']); $candidate_update = Candidate::where('business_id',$transaction->bid) ->where('admin_tag','VHA Working') ->update(['admin_tag' => 'VHA Complete']); public function addempexpdays($idealkey,$noofday){ $idealvideo_site = config('constants.IDEALVIDEO_SITE'); $url = $idealvideo_site.'api/employer/updateexpirydays'; $data = array('idealkey'=>$idealkey,'no_ofdays'=>$noofday); $postdata = json_encode($data); $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $result = curl_exec($ch); $result = json_decode($result); curl_close($ch); return $result; }