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