Esempio n. 1
0
 protected function storeApiLog($request, $response)
 {
     $logDetails = ['request_url' => $request->fullUrl(), 'request_data' => json_encode($request->all(), true), 'response' => $response->content(), 'status' => $response->status(), 'method' => $request->method(), 'host' => $request->ip(), 'header' => json_encode($request->header())];
     $this->apiLogService->saveLog($logDetails);
 }
 /**
  * Display the specified resource.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $log = $this->apiLogService->find($id);
     return view('apilog.show', compact('log'));
 }