/** * Gets all the innovations in a particular category * @param $category * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function getCategory($category) { $innovations = $this->repo->getCategory($category); $categoryName = Category::where('id', '=', $category)->first()->categoryName; return view('innovation.category', compact('categoryName', 'innovations')); }