public function showByLevel($date, $level, Request $request)
    {
        if ($level === 'all')
            return redirect()->route($this->showRoute, [$date]);

        $log     = $this->getLogOrFail($date);
        $query   = $request->get('query');
        $levels  = $this->logViewer->levelsNames();
        $entries = $this->logViewer->entries($date, $level)->paginate($this->perPage);

        return $this->view('show', compact('level', 'log', 'query', 'levels', 'entries'));
    }
public function showByLevel($date, $level, Request $request)
    {
        if ($level === 'all')
            return redirect()->route($this->showRoute, [$date]);

        $log     = $this->getLogOrFail($date);
        $query   = $request->get('query');
        $levels  = $this->logViewer->levelsNames();
        $entries = $this->logViewer->entries($date, $level)->paginate($this->perPage);

        return $this->view('show', compact('level', 'log', 'query', 'levels', 'entries'));
    }
public function showByLevel ( $ date , $ level , Request $ request ) { if ( $ level === 'all' ) return redirect ( ) -> route ( $ this -> showRoute , [ $ date ] ) ; $ log = $ this -> getLogOrFail ( $ date ) ; $ query = $ request -> get ( 'query' ) ; $ levels = $ this -> logViewer -> levelsNames ( ) ; $ entries = $ this -> logViewer -> entries ( $ date , $ level ) -> paginate ( $ this -> perPage ) ; return $ this -> view ( 'show' , compact ( 'level' , 'log' , 'query' , 'levels' , 'entries' ) ) ; }
Filter the log entries by level.

@param  string                    $date
@param  string                    $level
@param  \Illuminate\Http\Request  $request

@return \Illuminate\View\View|\Illuminate\Http\RedirectResponse
Filter the log entries by level .