/** * Resource edit view * GET /resource/{id}/edit * @param int $id * @return Response */ public function edit($id) { $data = $this->model->find($id); $categoryLists = ProductCategories::lists('name', 'id'); $product = $this->model->where('slug', $data->slug)->first(); return View::make($this->resourceView . '.edit')->with(compact('data', 'categoryLists', 'product')); }