From dba09e6c0354f499852e74ab65eef26fcc267cdc Mon Sep 17 00:00:00 2001 From: Artemy Date: Wed, 27 Jul 2016 03:21:48 +0500 Subject: [PATCH] Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1cd9b57..facd15f 100644 --- a/README.md +++ b/README.md @@ -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