Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Aircrafts

Laravel Aircrafts Laravel Package

ijeffro/laravel-aircrafts

Laravel Aircrafts is a Laravel package providing aircraft data with IATA codes, ISO 3166-3 codes, and country codes. It includes configuration, migration, and seeder support to create and populate an aircrafts table.

View on GitHub
Deep Wiki
Context7

IATA Aircraft Codes for Laravel Framework

Frequently asked questions about Laravel Aircrafts
How do I install ijeffro/laravel-aircrafts in a Laravel app?
Install it with Composer using composer require ijeffro/laravel-aircrafts. The README documents dev-master for Laravel 5, where you register AircraftsServiceProvider and the Aircrafts facade alias in config/app.php. Newer releases expose php artisan aircrafts:install --migrate, which publishes and runs the schema and seeder for a database-backed setup. Laravel 8 and 9 still require an abstraction layer or fork because of the legacy Laravel 5 dependency lineage.
Does laravel-aircrafts work with Laravel 8 or Laravel 9?
Not directly. The package remains on a Laravel 5 lineage, and the documented path for Laravel 8+ is to wrap it behind your own service layer or fork it. v1.0.1 is a patch release and does not modernize the framework constraints. Treat Laravel version compatibility as the highest residual integration risk.
How do I create and seed the aircrafts table?
Use php artisan aircrafts:install --migrate in v1.0.1 to publish and run the migration and seeder in one step. The README also documents the older flow: publish configuration with vendor:publish, run php artisan aircrafts:migration, dump autoload, then call AircraftsSeeder from DatabaseSeeder and run php artisan migrate --seed. The resulting aircrafts table is reference data you can join against in your own models.
Should I use the facade or the database table?
The facade gives you in-memory static reference data with zero database footprint, which suits validation lists and simple lookups. The migrated aircrafts table is better when you need joins, foreign keys, admin correction, or reporting without forking vendor code. Choose explicitly because the persistence option is real but optional.
Why does Aircrafts::codes() return 738 as a string?
Aircraft codes such as 738, 320, and 777 are numeric-looking IATA codes, and v1.0.1 changed codes() to return strings for all codes. That fixes strict comparisons like === '738', array-key lookups, cache keys, and JSON contracts where clients expect strings. Audit existing call sites for strict comparisons and string casts because this was a behavior change in a patch release.
How do I look up an aircraft by IATA code?
You can use the Aircrafts facade for code lookups, and the package now exposes an AircraftCode value object rather than only loose string handling. AircraftCode accepts an integer such as 738, which hardens the JSON request boundary for API-first consumers. Use the value object as a seam for validation, casting, and custom Eloquent casts on your own models.
Can I change the table name or sort order?
Yes. Publishing the configuration lets you change the table name if the default aircrafts name does not suit your schema. The package also exposes sortBy mapping, which lets you control deterministic ordering such as by manufacturer or by code. Document that configuration surface internally because you own it in your application.
Does laravel-aircrafts ship with tests or production support?
There is no visible test suite in the package, and the integer/string regression in v1.0.1 is the kind of bug a single unit test would have caught. Treat every minor or patch bump as potentially behavior-changing until you have proven it otherwise. Add your own characterization tests around the codes you depend on before upgrading.
What data is included for each aircraft?
Each record provides IATA aircraft codes along with ISO 3166-3 codes and country codes for the aircraft. The package is reference data only: it has no CRUD, no live flight data, and no real-time updates. There is also no documented upstream refresh process, so plan how you will correct or update records yourself.
What are alternatives if I need live or managed aircraft data?
Laravel Aircrafts is a lightweight reference-data package, not a flight-data API. If you need live or managed aircraft data, keep this package for static IATA lookups and integrate a separate aviation data provider. The migrated table still helps because you can join your own operational tables against the seeded reference rows.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console