public function showEvents(Category $category) { $events = $category->events()->upcoming()->get(); return $this->respond($events); }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show(Category $category) { $events = $category->events()->get()->groupBy('studio_id'); return view('admin.categories.show', compact('category', 'events')); }