I do not know how to ask this question, but I came to something I can't grasp in guzzle/guzzle package for Laravel. Let me show code and then I'll ask my question
$client = new \GuzzleHttp\Client();
$request = $client->createRequest('GET', 'http://foo.com');
$query = $request->getQuery();
$query['foo'] = 'bar';
$response = $client->send($request);
here foo is set in the request. How? I could understand it if $request->getQuery() would return a pointer, but that's not what really happened here isn't it.
I would expect some method to put $query object back in the $request.
$query['foo'].[]is adding another array to $query. ^_^