Level 50
What error message does your log show?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi all i have external API for loading data, i have job and file models (one to one relationship)
i want to create post method to store data from form to database if i use each model seperatly it work but when i put the two models in sam function it give this error
ServerException in RequestException.php line 113:
Server error: `POST http://aaaa.test/api/ime` resulted in a `500 Internal Server Error` response:
<!DOCTYPE html>
<html>
<head>
<meta name="robots" content="noindex,nofollow" />
<style>
(truncated...)
here is my code
$job = $request->job_id;
$url = 'http://careers1.test/api/ime';
$client = new Client();
$guzzleResult = $client->post($url, [
'form_params' => [
'job_id'=>$job,
'name'=>$request->name,
'email'=>$request->email,
]
]);
$job_req = json_decode($guzzleResult->getBody(),true);
$id = $job_req['job_req']['req']['job_id'];
$guzzleResult1 = $client->post($url, [
'form_params' => [
'jobReq_id'=>$id,
'filename'=>'filename'
]
]);
Please or to participate in this conversation.