示例#1
0
 public function getListByCategory($slug)
 {
     $projects = collect();
     if ($slug != "tutti") {
         $currentMC = \App\MacroCategory::getCurrentMacroCategoryBySlug($slug);
         $_projects = \App\Project::getProjectsByCateogory($currentMC->id);
         //dump($_projects);
     } else {
         $projects = \App\Project::All();
         $currentMC = collect();
         $currentMC->name = "tutti";
         $currentMC->fonticon = "fa-group";
     }
     foreach ($_projects as $project) {
         $project = \App\Project::getFullProjectData($project->id);
         $projects->push($project);
     }
     return view('cosplaydesign.pages.lista', compact("projects", "currentMC"));
 }