public function store(PersonalInfoRequest $request)
{
try {
$data = request()->except(['_token']);
$check = array_map('strtoupper', $data);
$value = PersonalInformationModel::Insert($check);
DB::commit();
if($value){
$this->JsonData['status'] = 'success';
$this->JsonData['url'] = route('reservation.index');
$this->JsonData['msg'] = 'Succesfully stored Personal details';
}
}
catch(Exception $e) {
$this->JsonData['msg'] = 'Something wen`t wrong on server! Please try again';
$this->JsonData['status'] = $e->getMessage();
DB::rollback();
}
return response()->json($this->JsonData);
}