public function getRequest($id) { if (!Config::get('app.debug')) { return; } $key = 'profiler-request-' . $id; $request = Cache::get($key); if (!$request) { exit; } Cache::forget($key); return Response::json(['request' => ProfileRequest::load($request)->toArray()], 200); }
protected function processResponse(ProfileRequest $profiler, Response $response) { $profiler->recordQueries(); Cache::put('profiler-request-' . $profiler->getId(), $profiler->toString(), 2); return $response->header('X-Request-Id', $profiler->getId()); }