How to redirect store
to update
method? I tryed the following code:
public function store(ProductRequest $request)
{
return $this->update(new Product, $request);
}
public function update(Product $product, ProductRequest $request)
{
// code
}
However, the first parameter of update
need an already in database user and the above code does not work as expected. (it update the entire users in db!)
What is the correct way to achieve that?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire