app/Http/Controllers/ThreadsController.php
/**
     * Display a listing of the resource.
     *
     * @param  Channel      $channel
     * @param ThreadFilters $filters
     * @param \App\Trending $trending
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
Display a listing of the resource .
public function index(Channel $channel, ThreadFilters $filters)
    {
        $threads = $this->getThreads($channel, $filters);
        if (request()->wantsJson()) {
            return $threads;
        }
        return view('threads.index', [
            'threads' => $threads,
            'channel' => $channel
        ]);
    }
public function index ( Channel $ channel , ThreadFilters $ filters ) { $ threads = $ this -> getThreads ( $ channel , $ filters ) ; if ( request ( ) -> wantsJson ( ) ) { return $ threads ; } return view ( 'threads.index' , [ 'threads' => $ threads , 'channel' => $ channel ] ) ; }
Display a listing of the resource.
Display a listing of the resource .