Addresses now a collection

This commit is contained in:
2024-07-07 15:14:55 +10:00
parent 0d9dbafcf1
commit 76889728cd
5 changed files with 23 additions and 23 deletions

View File

@@ -206,10 +206,9 @@ class Account extends Model implements IDs
/**
* Get the address for the account
*
* @return array
* @todo Change this to return a collection
* @return Collection
*/
public function getAddressAttribute(): array
public function getAddressAttribute(): Collection
{
return collect([
'address1' => $this->address1,
@@ -219,9 +218,7 @@ class Account extends Model implements IDs
$this->state,
$this->zip)
])
->filter()
->values()
->toArray();
->filter();
}
/**