|
|
@ -274,7 +274,12 @@ class PresenceController extends Controller |
|
|
|
$dataGet = $builder->get(); |
|
|
|
$dataGet = $builder->get(); |
|
|
|
$finalData = []; |
|
|
|
$finalData = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach($dataGet as $data){ |
|
|
|
|
|
|
|
$responseIn = $this.getLoc($clock_in_lat, $clock_in_lng); |
|
|
|
|
|
|
|
$responseOut = $this.getLoc($clock_in_lat, $clock_in_lng); |
|
|
|
|
|
|
|
$data->clock_in_loc = $responseIn->json()["display_name"]; |
|
|
|
|
|
|
|
$data->clock_out_loc = $responseOut->json()["display_name"]; |
|
|
|
|
|
|
|
} |
|
|
|
$totalRecord = $countBuilder->count(); |
|
|
|
$totalRecord = $countBuilder->count(); |
|
|
|
return response()->json(['status'=>'success','code'=>200,'data'=>$dataGet, 'totalRecord'=>$totalRecord], 200); |
|
|
|
return response()->json(['status'=>'success','code'=>200,'data'=>$dataGet, 'totalRecord'=>$totalRecord], 200); |
|
|
|
} |
|
|
|
} |
|
|
|