/** * Display the specified resource. * * @param int $section_id - default to the first section * @return Response */ public function show($section_id = null) { if (!$section_id) { $section = \Nexus\Section::with('sections', 'topics')->first(); } else { $section = \Nexus\Section::with('sections', 'topics')->where('id', $section_id)->first(); } \Nexus\Helpers\ActivityHelper::updateActivity(\Auth::user()->id, "Browsing <em>{$section->title}</em>", action('Nexus\\SectionController@show', ['id' => $section->id])); $breadcrumbs = \Nexus\Helpers\BreadcrumbHelper::breadcrumbForSection($section); return view('sections.index', compact('section', 'breadcrumbs')); }