ijeffro/laravel-airlines
Laravel Airlines provides IATA codes, ISO 3166-3 and country codes for airlines, with a service provider, facade, migration generator, and seeder to populate an airlines table in your Laravel app.
Airlines::all(), Airlines::findByIata(), Airlines::codes(), etc.airlines:install --migrate, which consolidates publish + migrate into a single command. This materially reduces setup friction versus the prior manual vendor:publish → migrate sequence.RouteServiceProvider structure, facades, service container).codes() returned all-digit designators (e.g., 00) as integers while alphanumeric codes returned as strings, producing a mixed-type dataset. This is a classic source of === comparison failures, broken JSON payloads, and validation bypasses (e.g., in: rules, strict_types code paths).codes() now returns every designator as a string, guaranteeing a homogeneous return type. This closes a genuine correctness/correctness-of-integration hole for consumers relying on strict typing.Cache::remember) or lazy-load only needed records.codes() return-type assertions.codes(), do we need to audit that logic for the v1.0.1 behavior change?spatie/laravel-data + custom IATA API) with better maintenance?codes() is type-stable? Or is validation still the caller's responsibility?Airlines::codes() for loose comparisons or integer coercion — the v1.0.1 string-normalization may surface latent bugs.composer.json to target Laravel 8.x/9.x/10.x.App::make() → DI, Route::bind() → implicit binding).codes() returns all strings.php artisan airlines:install --migrate (single-command publish + migration).php artisan vendor:publish --provider="ijeffro\Airlines\AirlinesServiceProvider" followed by php artisan migrate.config/app.php if the package predates auto-discovery.NOT NULL country columns to nullable. The v1.0.1 README explicitly warns that non-nullable country columns will break seeding/installation. Treat this as a mandatory pre-deploy check for greenfield and brownfield alike.airlines table via a seed class.sortBy Usage Note (New):
sortBy mapping. Any prior usage relying on snake_case or un-mapped field names should be verified against the updated docs.config('airlines')) to bypass facade issues.Airlines::findByIata('AA'), codes() string-type assertion).codes() for integer assumptions (new for v1.0.1).php artisan airlines:install --migrate.NOT NULL country columns are nullable before seeding (new).Airlines::all(), codes()).airlines:install --migrate command, and the camelCase sortBy mapping, and flags the nullable country-column requirement. This narrows the prior documentation gap for setup, though advanced usage is still inferred.all() and codes()) or implement lazy loading.NOT NULL country columns must be made nullable before seeding. Failing to do so will break airlines:install --migrate and abort seeding.sortBy mapping, migration caveat). Advanced usage still requires inference from the README.findByIata(), findByCountry(), and bulk retrieval under load.Airlines::findByIata('XXX')) and assert codes() returns strings for all-digit designators (e.g., '00' not 0).How can I help you explore Laravel packages today?