Laravel-Addresses icon indicating copy to clipboard operation
Laravel-Addresses copied to clipboard

updateAddress expects all address attributes

Open de-raaf-media opened this issue 1 year ago • 0 comments

Hi there,

In the documentation I see the following code for updating an existing address:

$post->updateAddress($address, $new_attributes);

So I added a variable to update the street address. Like this:

$new_attributes = [
  'street'     => '123 Update Drive',
];

Is it correct that this does not work and I need to add the existing attributes as well? I now merge the existing address array with my new_attributes array. Is that how I should do it?

Mark

de-raaf-media avatar Nov 29 '23 15:11 de-raaf-media