public function getStatus() { $getbalance = Rechargeurl::status(); if ($getbalance) { $new_array = Commonmodel::arr($getbalance); $finalarray = $new_array['RESPONSERECHARGEINFO']['SOPERATOR']; foreach ($finalarray as $new_arrays) { $status = $new_arrays['DESCRIPTION']; if ($status = 'APPAN DUKAN MARKETING') { $input = array('rd_result' => 'Success'); Recharge::where('rd_trans_id', '=', $new_arrays['RESPONSEID'])->update($input); } } return Response::json(array('status' => 'Success', 'message' => 'Status Updated Successfully')); } else { return Response::json(array('status' => 'failure', 'message' => 'No Transaction History')); } }