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