public function index(Request $request)
    {
        $jobs = ! $request->query('tag')
                ? $this->paginate($request)
                : $this->paginateByTag($request, $request->query('tag'));

        $total = $request->query('tag')
                ? $this->tags->count('failed:'.$request->query('tag'))
                : $this->jobs->countFailed();

        return [
            'jobs' => $jobs,
            'total' => $total,
        ];
    }
public function index(Request $request)
    {
        $jobs = ! $request->query('tag')
                ? $this->paginate($request)
                : $this->paginateByTag($request, $request->query('tag'));

        $total = $request->query('tag')
                ? $this->tags->count('failed:'.$request->query('tag'))
                : $this->jobs->countFailed();

        return [
            'jobs' => $jobs,
            'total' => $total,
        ];
    }
public function index ( Request $ request ) { $ jobs = ! $ request -> query ( 'tag' ) ? $ this -> paginate ( $ request ) : $ this -> paginateByTag ( $ request , $ request -> query ( 'tag' ) ) ; $ total = $ request -> query ( 'tag' ) ? $ this -> tags -> count ( 'failed:' . $ request -> query ( 'tag' ) ) : $ this -> jobs -> countFailed ( ) ; return [ 'jobs' => $ jobs , 'total' => $ total , ] ; }
Get all of the failed jobs.

@param  \Illuminate\Http\Request  $request
@return array
Get all of the failed jobs .