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