Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buibr/address
Laravel package for managing addresses on model, morph class for a class, ex. User'
https://github.com/buibr/address
Last synced: 23 days ago
JSON representation
Laravel package for managing addresses on model, morph class for a class, ex. User'
- Host: GitHub
- URL: https://github.com/buibr/address
- Owner: buibr
- Created: 2020-10-04T01:01:05.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-07T06:05:19.000Z (over 1 year ago)
- Last Synced: 2024-11-15T02:09:33.807Z (about 2 months ago)
- Language: PHP
- Size: 932 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# buibr/address
Laravel package for managing addresses on model, morph class for a class, ex. User'### Usage
```php
class User {
use HasAddress;
}$user = User::first($id);
$user->adresses; // Collection[Address]
$user->addresses() // HasMany$user->hasAddress() // boolean
$user->addAddress([...]) // AddressInterface
$user->getAddresses(); // Collection[Address]
$user->primaryAddress // Address or null
```