Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lartie/airports
List of airports
https://github.com/lartie/airports
airport airports composer dump iana iana-database iana-tzdb iata iata-codes laravel laravel-package php sql
Last synced: 12 days ago
JSON representation
List of airports
- Host: GitHub
- URL: https://github.com/lartie/airports
- Owner: lartie
- License: mit
- Created: 2016-07-26T15:14:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-28T08:30:46.000Z (over 8 years ago)
- Last Synced: 2024-11-23T20:41:46.460Z (29 days ago)
- Topics: airport, airports, composer, dump, iana, iana-database, iana-tzdb, iata, iata-codes, laravel, laravel-package, php, sql
- Language: PHP
- Homepage:
- Size: 315 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Airports for Laravel 5
[![Latest Stable Version](https://poser.pugx.org/lartie/airports/v/stable)](https://packagist.org/packages/lartie/airports)
[![Total Downloads](https://poser.pugx.org/lartie/airports/downloads)](https://packagist.org/packages/lartie/airports)
[![Latest Unstable Version](https://poser.pugx.org/lartie/airports/v/unstable)](https://packagist.org/packages/lartie/airports)
[![License](https://poser.pugx.org/lartie/airports/license)](https://packagist.org/packages/lartie/airports)
[![composer.lock](https://poser.pugx.org/lartie/airports/composerlock)](https://packagist.org/packages/lartie/airports)## Install
```bash
composer require lartie/airports
``````php
'providers' => [
...
LArtie\Airports\AirportsServiceProvider::class,
]
``````bash
php artisan vendor:publishphp artisan migrate
php artisan airports:install
```## Usage
```php
$country = Country::where('name_en', 'Russia')->first();$city = $country->cities()->first();
$city->name_en;
$city->name_ru;$country = $city->country()->first();
$country->name_en;
$country->name_ru;
$country->iso_code;$airport = $city->airports()->first();
$airport->gmt_offset;
$airport->iata_code;
$airport->icao_code;$city = $airport->city()->first();
```## License
MIT