app/Http/Controllers/Blog/BlogController.php
/**
     * Display Category Page
     *
     * @return \Illuminate\Http\Response
     */
Display Category Page
@return \Illuminate\Http\Response
Display Category Page @return \ Illuminate \ Http \ Response
public function showPostsInCategory($id)
    {
        $category = $this->blogRepository->getCategory($id);
        $posts = $this->blogRepository->listPostsInCategory($id,10);
        $categories = $this->categories;
        return view('blog.category', compact('posts','category','categories'));
    }
public function showPostsInCategory ( $ id ) { $ category = $ this -> blogRepository -> getCategory ( $ id ) ; $ posts = $ this -> blogRepository -> listPostsInCategory ( $ id , 10 ) ; $ categories = $ this -> categories ; return view ( 'blog.category' , compact ( 'posts' , 'category' , 'categories' ) ) ; }
Display Category Page
 @return \Illuminate\Http\Response
Display Category Page @return \ Illuminate \ Http \ Response