/** * Show posts of the given category. * * @param Request $request * @param string $categoryId * @return Response */ public function show(Request $request, $categoryId) { return view('categories.show', ['category' => $this->categories->categoryInfo($categoryId), 'posts' => $this->categories->categoryPosts($categoryId)]); }