I would like to know how it is possible to merge data from Input::all()
with a model and save the result.
To clarify: I would like to do something like below:
$product = Product::find(1); // Eloquent Model
$product->merge( Input::all() ); // This is what I am looking for :)
$product->save();
You should use update
method:
$product->update(Input::all());
But I recommend to use only
method instead
$product->update(Input::only('name', 'type...'));
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments