query('gate'); $query = $_GET['gate'] ?? null; Log::info('Query Params:', $request->query()); Log::info('Gate Param:', [$request->query('gate')]); $getLocation = SoftSettings::first(); $location = [ 'namaSoftware' => $getLocation->namasoft, 'namaSystem' => $getLocation->namasystem, 'LocatioName' => $getLocation->namalokasi, 'locationAddress' => $getLocation->alamatlokasi ?? 'location Undefined', 'CompanyName' => $getLocation->namaperusahaan, 'merchantID' => $getLocation->cabang_lokasi, ]; if (!array_key_exists('gate', $_GET)) { return response()->json([ 'status' => 'success', // 'desc' => 'Parameter undefined', 'details' => $location ],400); } if ($query === '') { return response()->json([ 'status' => 'failed', 'desc' => 'Parameter gate tidak boleh kosong', ], 400); } if($query) { $getPos = NamaPos::where('id', $request->query('gate'))->with('posParams','posHardware')->first(); $location['gateDetails'] = $getPos; // Log::info($getPos->toSql()); return response()->json([ 'status' => 'success', 'details' => $location ]); } return response()->json([ 'status' => 'success', 'details' => $location, ]); } }