Tengo una peticion GET asincrona que estoy realizando con GuzzleHttp
$promise = $this->cliente->requestAsync('GET', $this->base_uri . $this->catalogs_uri . $catalog);
$promise->then(
function (ResponseInterface $res) {
return $res;
},
function (RequestException $err) {
return $err;
}
);
$response = $promise->wait();
return json_decode($response->getBody()->getContents());
En Tinker y postman SI recibo los datos, el problema está en cuando lo implemento en Livewire obtengo el siguiente error
Server error:
GET http://xxx.test/api/catalogs/payment-terms
resulted in a500 Internal Server Error
response: <!-- Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table  (truncated...) (View: C:\laragon\www\xxxx\resources\views\livewire\xxx\xxxx\index.blade.php)
En el controlador de Livewire:
public function mount()
{
$this->cliente = new Cliente();
$this->payment_terms = Tron::getClientCatalog('payment-terms');
}
¿Habrá que añadir algo al header?