示例#1
0
 /**
  * @return \Illuminate\Http\JsonResponse
  */
 public function clear()
 {
     try {
         $this->profiler->getDatasource()->clear();
     } catch (\Exception $e) {
         return response()->json(['error' => $e->getMessage()], 500);
     }
     return response()->json(['success' => true]);
 }
示例#2
0
文件: Web.php 项目: ndrx-io/profiler
 /**
  * @param int $offset
  * @param int $limit
  * @return string
  */
 public function index($offset = 0, $limit = 20)
 {
     $profiles = $this->profiler->getDatasource()->all($offset, $limit);
     $renderer = new ProcessList($profiles);
     return $renderer->content();
 }