/**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id, Category $category, User $user)
 {
     $product = $this->productModel->find($id);
     $categories = $category->lists('name', 'id');
     $users = $user->lists('name', 'id');
     return view('product.edit', compact('product', 'categories', 'users'));
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }