Update Some fields from controller and others from form - Driver laravel

1

As I say in the title, I need to update some fields from the form and others in the controller automatically I know this form

$ejemplo = Usershow::find($id)->update(['campo1' => $variable1]);

But I would like to know if there is another way since the table has many fields and I only want to modify one from the controller and when having to specify all there is a very long code. I tried this but it gives me the empty request

$dsa = Dsa::Create($request->all());
$request->ejemplo = 1;

Any ideas?

    
asked by jorge 24.11.2018 в 17:24
source

0 answers