gnpportal - save survey 'cipla to doc' on gnpportal
This commit is contained in:
parent
9a7e5d7993
commit
60ff13a206
|
|
@ -113,4 +113,44 @@ class SurveyController extends Controller
|
||||||
return \Redirect::back()->withMessage('Some Error occured!');
|
return \Redirect::back()->withMessage('Some Error occured!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ajaxgnpsubmit(Request $request)
|
||||||
|
{
|
||||||
|
$post['emp_id'] = $request->emp_id;
|
||||||
|
$post['emp_name'] = $request->emp_name;
|
||||||
|
$post['emp_phone'] = $request->emp_phone;
|
||||||
|
$post['emp_email'] = $request->emp_email;
|
||||||
|
$post['abm_name'] = $request->abm_name;
|
||||||
|
$post['abm_email'] = $request->abm_email;
|
||||||
|
$post['rbm_name'] = $request->rbm_name;
|
||||||
|
$post['msl_code'] = $request->msl_code;
|
||||||
|
$post['doctor_speciality'] = $request->doctor_speciality;
|
||||||
|
$post['no_of_nebulizer'] = $request->no_of_nebulizer;
|
||||||
|
$post['value_of_parcel'] = $request->value_of_parcel;
|
||||||
|
$post['nebulizer_purpose'] = $request->nebulizer_purpose;
|
||||||
|
$post['doctor_name'] = $request->doctor_name;
|
||||||
|
$post['doctor_phone'] = $request->doctor_phone;
|
||||||
|
$post['address_type'] = $request->address_type;
|
||||||
|
$post['address_building'] = $request->address_building;
|
||||||
|
$post['address_line_1'] = $request->address_line_1;
|
||||||
|
$post['address_line_2'] = $request->address_line_2;
|
||||||
|
$post['address_landmark'] = $request->address_landmark;
|
||||||
|
$post['address_state'] = $request->address_state;
|
||||||
|
$post['address_city'] = $request->address_city;
|
||||||
|
$post['request_letter'] = $request->request_letter;
|
||||||
|
|
||||||
|
$handler = curl_init();
|
||||||
|
// curl_setopt($handler, CURLOPT_URL, "http://127.0.0.1:8001/neblogisticsave/ciplatodoctor");
|
||||||
|
curl_setopt($handler, CURLOPT_URL, "https://gnpdoctor.buildrapport.co/neblogisticsave/ciplatodoctor");
|
||||||
|
curl_setopt($handler, CURLOPT_POSTFIELDS, http_build_query($post));
|
||||||
|
curl_setopt($handler, CURLOPT_POST, 1);
|
||||||
|
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
$response = curl_exec($handler);
|
||||||
|
|
||||||
|
if ($response !== false) {
|
||||||
|
var_dump($response);
|
||||||
|
} else {
|
||||||
|
print "Could not get a response";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,17 @@
|
||||||
$('#report-form').on('submit', function(event) {
|
$('#report-form').on('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$("#pageloader").fadeIn();
|
$("#pageloader").fadeIn();
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: '/srvey/ciplatodoctor',
|
||||||
|
data: new FormData($('#report-form')[0]),
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
success: function(data) {
|
||||||
|
console.log(data);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: '/srvey/ajaxsubmit',
|
url: '/srvey/ajaxsubmit',
|
||||||
|
|
@ -239,7 +250,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,7 @@ Route::get('/form/{finfo}', [FormController::class, 'handle']);
|
||||||
Route::get('/srvey/{finfo}', [FormController::class, 'surveyhandle']);
|
Route::get('/srvey/{finfo}', [FormController::class, 'surveyhandle']);
|
||||||
Route::post('/srvey/ajaxsubmit', [FormController::class, 'ajaxsurveysubmit']);
|
Route::post('/srvey/ajaxsubmit', [FormController::class, 'ajaxsurveysubmit']);
|
||||||
|
|
||||||
|
Route::post('/srvey/ciplatodoctor', [SurveyController::class, 'ajaxgnpsubmit']);
|
||||||
|
|
||||||
Route::get('/', [RoutingController::class, 'index'])->name('root');
|
Route::get('/', [RoutingController::class, 'index'])->name('root');
|
||||||
Route::get('{any}', [RoutingController::class, 'root'])->name('any');
|
Route::get('{any}', [RoutingController::class, 'root'])->name('any');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue