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