webappid / laravel-airport

2.1.4 2020-04-04 09:06 UTC

This package is auto-updated.

Last update: 2024-09-05 00:01:49 UTC


README

此包的数据基于https://openflights.org/data.html#airport

如何安装

  1. 使用composer安装 composer require webappid/laravel-airport
  2. 播种数据 webappid:airport:seed

示例:按国家获取机场

<?php
use WebAppId\Airport\Services\AirportService

class ExampleAirport{
   public function getAirPort(AirportService $airportService, Container $container){
      $result = $container->call([$airportService, 'getAllAirportByCountry'], ['countryCode' => '[country_code]']);
   }
}