Request getQueryString() method not reflecting added params
public function index(Request $request) {
$request->merge([
'param1' => 'something',
'param2' => 'something'
]);
dd($request->getQueryString());
}
Hi all,
In the controller code above, I am not able to get the getQueryString() to output the correct query string based on the additional parameters added using the merge method. It seems to only capture the original parameters passed naturally from the URL in the browser.
How can I add parameters programmatically and generate the query string?