Answer the question
In order to leave comments, you need to log in
How to take everything from Request and add 1 field on Insert in Laravel 5.3?
This code takes everything: $product = new Product($request->all());
You can of course break it down, take everything by type:
$product = new Product([
'name' => $request->name,
'description' => $request->name,
...
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question