model = $program; parent::__construct(); } /** * Show program's list. * * @param string $slug * * @return response */ protected function index() { $programs = $this->model->all(); return $this->theme->of('program::public.program.index', compact('programs'))->render(); } /** * Show program. * * @param string $slug * * @return response */ protected function show($slug) { $program = $this->model->findBySlug($slug); return $this->theme->of('program::public.program.show', compact('program'))->render(); } }