when I print the dd I have the id, but when I try to use it, it gives the error.
public function LoadcalculoSeguro(CalculoSeguroService $calculoSeguroService){
if (!empty($this->atividadeCode))
{
$this->precos=$calculoSeguroService->getPrecos($this->atividadeCode);
// dd ($this->precos);
// here - return error
$this->calculos=$calculoSeguroService->getAll($this->precos->id, $this->atividadeCode);
}
}
```php