header('Authentication'); $appid = request()->header('appid'); $this->user_id = Cache::get($auth); $this->agent_id = Cache::get($appid); } protected function success($data = [], $msg = 'success', $code = 1, $status = 200): array { return [ 'code' => $code, 'msg' => $msg, 'data' => $data, 'status' => $status, ]; } protected function error($msg = 'error', $code = -1, $status = 500): array { return [ 'code' => $code, 'msg' => $msg, 'data' => [], 'status' => $status, ]; } }