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