Skip to content

Commit

Permalink
Merge pull request #4 from phpMagpie/chore/readme-coordinates-field
Browse files Browse the repository at this point in the history
docs(README.md): update terminology from 'position' to 'coordinates'
  • Loading branch information
masterix21 authored Dec 18, 2024
2 parents ff6a387 + 366c6e8 commit a58a0e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ $billingAddress->markPrimary(); // It will emit the events `AddressPrimaryMarked
$billingAddress->unmarkPrimary(); // It will emit the events `AddressPrimaryUnmarked` and `BillingAddressPrimaryUnmarked`
```

### Create a billing address with position
### Create a billing address with coordinates
```php
$user->billingAddress()->create([
'street_address1' => 'Via Antonio Izzi de Falenta, 7/C',
Expand All @@ -83,13 +83,13 @@ $user->billingAddress()->create([
'state' => 'CZ',
'country' => 'Italy',
'country_code' => 'IT',
'position' => new Point(16.0129, 36.01010)
'coordinates' => new Point(16.0129, 36.01010)
]);
```

### Store latitude and longitude for an address
```php
$billingAddress->position = new Point(38.90852, 16.5894);
$billingAddress->coordinates = new Point(38.90852, 16.5894);
$billingAddress->save();
```

Expand Down

0 comments on commit a58a0e2

Please sign in to comment.