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: about 1 year 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 (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-28T08:30:46.000Z (over 9 years ago)
- Last Synced: 2025-02-05T10:17:32.274Z (about 1 year 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
[](https://packagist.org/packages/lartie/airports)
[](https://packagist.org/packages/lartie/airports)
[](https://packagist.org/packages/lartie/airports)
[](https://packagist.org/packages/lartie/airports)
[](https://packagist.org/packages/lartie/airports)
## Install
```bash
composer require lartie/airports
```
```php
'providers' => [
...
LArtie\Airports\AirportsServiceProvider::class,
]
```
```bash
php artisan vendor:publish
php 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