$v) { array_push($result, [ 'admin_uid' => $k, 'debug_uid' => $v ]); } return array( 'code' => 200, 'message' => 'success', 'data' => $result ); } catch (\Exception $e) { throw new \ApiException($e->getMessage(), 501); } } public function store(Request $request) { $uid = Auth::adminAuth(); try { $this->validate($request, [ 'admin_uid' => 'required|integer', 'debug_uid' => 'required|integer' ]); Redis::hset("fpdx_admin_debug", $request->input('admin_uid'), $request->input('debug_uid')); return array( 'code' => 200, 'message' => 'success' ); } catch (\Exception $e) { throw new \ApiException($e->getMessage(), 501); } } public function delete(Request $request) { $uid = Auth::adminAuth(); try { $this->validate($request, [ 'admin_uid' => 'required|integer' ]); Redis::hdel("fpdx_admin_debug", $request->input('admin_uid')); return array( 'code' => 200, 'message' => 'success' ); } catch (\Exception $e) { throw new \ApiException($e->getMessage(), 501); } } }