SyntaxFix
Write A Post
Hire A Developer
Questions
Use merge():
merge()
$request->merge([ 'user_id' => $modified_user_id_here, ]);
Simple! No need to transfer the entire $request->all() to another variable.
$request->all()