Exemplo n.º 1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show(QueryRequest $request, $id)
 {
     $entry = $this->log->date(strtotime($request->get('date')))->find($id);
     $raw = explode(': ', $entry->header, 2)[1];
     $line = explode(' {', $raw, 2);
     $log = ['date' => Carbon::createFromFormat('Y-m-d H:i:s', $entry->date), 'level' => $entry->level, 'message' => $line[0], 'context' => isset($line[1]) ? '{' . $line[1] : null, 'id' => $entry->id, 'stack' => $entry->stack];
     return view('system.entry', compact('log'));
 }