how to save api data to existing database table.
public function delivery_info(Request $request){
//write codes here
$params = '';
$data = array(
'login' => 'cargouser',
'password' => 'cargouser',
'db' => 'digital',
'domain' => '[(\'name\',\'=\', \''.$request->job_id.'\')]',
'fields' => '[\'delivery_date\',\'branch_id\',\'assigned_to\']',
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '/api/delivery',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => $data,
CURLOPT_HTTPHEADER => array(
'access-token: access_token_0114bc7cdeb37408c9c161d03d4eef93c62a54a0',
'Cookie: session_id=09d860cd97a45a89fc7c90de17fe50f0672f1c18'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
}
```