I have Laravel 6.0 with something like this using the request()->all();
helper to create a new row on the database...
$input = request()->all();
Service::create($input);
I want to add two variables to it manually so that we don't need the user to add them manually. I have tried variations on this...
$time = time();
$input = array_merge(request()->all(), ['serviceSite' => 'companyname', 'serviceOrderedTime' => $time]);
Service::create($input);
Is there a way to do this with the request()
helper or do I have to use an alternative method?