Server 1 seems right.
On server 2, could you try:
$EloquentModel->prop1 = $request->get('var1.prop1');
Best would probably to write out $request->all() to a file or as a response and see what data you got to make sure it's there.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to send data from one to another server using Guzzle Http... Something like this...
Server 1 (Cron Job):
$response = $client->request('POST', $uri, [
'form_params' => [
'var1' => $var1,
'var2' => $var2,
---
]
]);
$var1 and $var2 are associative arrays with keys 'prop1', 'prop2'... On the other side I am trying to get these values...
Server 2 (Controller):
$request -> validate(...)
$EloquentModel -> prop1 = $request -> var1['prop1'];
$EloquentModel -> prop2 = $request -> var1['prop2'];
$EloquentModel -> prop3 = $request -> var1['prop3'];
$EloquentModel -> save()
If I remove validation part I get records inside my DB, but with empty prop1, prop2... fields. So, I don't know am I making mistake on server 1 or server 2?
Please or to participate in this conversation.