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