public function getData(Request $request) | public function getData(Request $request) | ||||
{ | { | ||||
info('encode request ' . json_encode($request->data)); | |||||
// info('encode request ' . json_encode($request->data)); | |||||
$data = $request->data; | $data = $request->data; | ||||
$filename = time(); | $filename = time(); | ||||
$location = 'public/uploads/cache/'.$filename.'.json'; | $location = 'public/uploads/cache/'.$filename.'.json'; | ||||
info('filename location ' . $location); | |||||
// info('filename location ' . $location); | |||||
file_put_contents(base_path($location), stripslashes($data)); | file_put_contents(base_path($location), stripslashes($data)); | ||||
return $filename; | return $filename; |
// } | // } | ||||
info(json_encode($data)); | |||||
// info(json_encode($data)); | |||||
if(!empty($staff)){ | if(!empty($staff)){ | ||||
if($staff->token_firebase != '') { | if($staff->token_firebase != '') { |
$data = $request->data; | $data = $request->data; | ||||
$register_id = $request->register_id; | $register_id = $request->register_id; | ||||
info($data); | |||||
// info($data); | |||||
if($register_id != null){ | if($register_id != null){ | ||||
$result = $this->createNotifications($title, $msg, $data, $register_id); | $result = $this->createNotifications($title, $msg, $data, $register_id); |
if($epbt_faulty){ | if($epbt_faulty){ | ||||
info($epbt_faulty); | |||||
// info($epbt_faulty); | |||||
$roads = CodeMukim::where('MKM_MNAMA', $compound['nama_kawasan'])->first(); | $roads = CodeMukim::where('MKM_MNAMA', $compound['nama_kawasan'])->first(); | ||||
$no_akaun = $compound->no_plate; | $no_akaun = $compound->no_plate; | ||||
$nama_pesalah = $compound->no_plate; | $nama_pesalah = $compound->no_plate; | ||||
$no_kereta = $compound->no_plate; | $no_kereta = $compound->no_plate; | ||||
$jenis_kereta = $compo->model_kenderaan; | |||||
$jenis_kereta = $compound->model_kenderaan; | |||||
$no_petak = $compound->no_parking; | $no_petak = $compound->no_parking; | ||||
$no_cukai_jalan = $compound->no_cukai_jalan; | $no_cukai_jalan = $compound->no_cukai_jalan; | ||||
$warna_kenderaan= $compound->warna_kenderaan; | $warna_kenderaan= $compound->warna_kenderaan; |