public function byCategory($slug) { $category = new Category(); $collection = $category->searchByCategory($slug, 'projects'); return view('sites.index')->with('categoryOn', $collection['category'])->with('projects', $collection['collection'])->with('currentMenu', 'proyectos'); }