| $compound = Compound::with('ConfidentialFile')->where('confidential_file_id',$request->confidential)->first(); | $compound = Compound::with('ConfidentialFile')->where('confidential_file_id',$request->confidential)->first(); | ||||
| $data = array(); | |||||
| $data = array(); | |||||
| $kpd = ''; | |||||
| if($compound->penguatkuasa == $request->penguatkuasa){ | if($compound->penguatkuasa == $request->penguatkuasa){ | ||||
| $result = $client->request('POST', url('api/push/notification'), [ | $result = $client->request('POST', url('api/push/notification'), [ | ||||
| 'verify' => false, | 'verify' => false, | ||||
| 'form_params' => [ | 'form_params' => [ | ||||
| 'title' => $role->name.' '.$compound->non, | |||||
| 'title' => $role->name.' '.$kpd, | |||||
| 'msg' => 'Kompaun ini berada di ruangan '.$role->name , | 'msg' => 'Kompaun ini berada di ruangan '.$role->name , | ||||
| 'data' => json_encode($data), | 'data' => json_encode($data), | ||||
| 'register_id[]' => $staff->token_firebase, | 'register_id[]' => $staff->token_firebase, |