/**
  * Make log menu.
  *
  * @param  Log   $log
  * @param  bool  $trans
  *
  * @return array
  */
 public function make(Log $log, $trans = true)
 {
     $items = [];
     foreach ($log->tree($trans) as $level => $item) {
         $items[$level] = array_merge($item, ['url' => route('log-viewer::logs.filter', [$log->date, $level]), 'icon' => $this->isIconsEnabled() ? $this->styler->icon($level) : '']);
     }
     return $items;
 }
Beispiel #2
0
 /**
  * Make log menu.
  *
  * @param  \Arcanedev\LogViewer\Entities\Log  $log
  * @param  bool                               $trans
  *
  * @return array
  */
 public function make(Log $log, $trans = true)
 {
     $items = [];
     $route = $this->config('menu.filter-route');
     foreach ($log->tree($trans) as $level => $item) {
         $items[$level] = array_merge($item, ['url' => route($route, [str_replace('/', '_', $log->date), $level]), 'icon' => $this->isIconsEnabled() ? $this->styler->icon($level) : '']);
     }
     return $items;
 }