lartie / Airports by lartie

Airports for Laravel
22
3
2
Package Data
Maintainer Username: lartie
Maintainer Contact: log.wil.log@gmail.com (Artie)
Package Create Date: 2016-07-26
Package Last Update: 2016-07-28
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-18 03:03:49
Package Statistics
Total Downloads: 22
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 3
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Airports for Laravel 5

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

Install

composer require lartie/airports
'providers' => [
  ...
  LArtie\Airports\AirportsServiceProvider::class,
]
php artisan vendor:publish

php artisan migrate

php artisan airports:install

Usage

$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