Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lartie authored Jul 26, 2016
1 parent e243852 commit dba09e6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,23 @@ php artisan airports:install
## Usage

```php
$city = Country::where('name_en', 'Russia')->cities()->first();
$country = Country::where('name_en', 'Russia')->first();

$city = $country->cities()->first();
$city->name_en;
$city->name_ru;

$country = City::where('name_en', 'Moscow')->country()->first();
$country = $city->country()->first();
$country->name_en;
$country->name_ru;
$country->iso_code;

$airport = City::where('name_en', 'Magnitogorsk')->airports()->first();
$airport = $city->airports()->first();
$airport->gmt_offset;
$airport->iata_code;
$airport->icao_code;

$city = City::where('iata_code', 'DME')->city()->first();
$city = $airport->city()->first();
```

## License
Expand Down

0 comments on commit dba09e6

Please sign in to comment.