Download the PHP package flairuk/laravel-airlines without Composer

On this page you can find all versions of the php package flairuk/laravel-airlines. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-airlines

PHP 8.2+  Laravel 12 or 13  Lint  Tests  Downloads on Packagist  MIT licence  IATA 
 

**Laravel Airlines** โ€” IATA airline designators (`BA`, `EK`, `QF`, โ€ฆ) for Laravel 12 and 13. - **No database required.** Look airlines up through a facade backed by an in-memory dataset. - **Typed results.** Every lookup returns readonly `Airline` objects in Laravel collections. - **Validation rule.** `new AirlineCode` accepts known designators only. - **Optional table.** Publish a migration and seed an `airlines` table when other tables need to reference airlines.

๐Ÿ“ฆ Installation ยท ๐Ÿš€ Usage ยท ๐Ÿ’พ Database table ยท ๐Ÿ”„ Upgrading



## ๐Ÿ“ฆ Installation Requires PHP 8.2 or later with Laravel 12, or PHP 8.3 or later with Laravel 13. Laravel discovers the service provider and the `Airlines` facade automatically.

## ๐Ÿš€ Usage IATA re-issues designators, so a code can belong to more than one airline. `find()` returns the first one and `allWithCode('1I')` returns every match. ### Select options ### Validation ### Dependency injection The facade resolves a singleton `FLAIRUK\Airlines\Airlines`, which you can type-hint instead:

## ๐Ÿ’พ Database table (optional) If you need airlines in your database, for example for foreign keys or joins: This command publishes `config/airlines.php` and a migration, then offers to run `migrate` and seed the table. You can re-seed at any time; it upserts rows, so re-running is safe: You can also call the seeder from your own `DatabaseSeeder`: Query the table through the bundled Eloquent model: The table name and connection come from `AIRLINES_TABLE` and `AIRLINES_DB_CONNECTION`, or from the published config.

## ๐Ÿ”„ Upgrading from dev-master Version 1.0 is a rewrite. Breaking changes: | dev-master | 1.0 | | --- | --- | | Package `ijeffro/laravel-airlines` | `flairuk/laravel-airlines` | | `ijeffro\Airlines\โ€ฆ` namespace | `FLAIRUK\Airlines\โ€ฆ` | | Facade `ijeffro\Airlines\AirlinesFacade` | `FLAIRUK\Airlines\Facades\Airlines` (auto-discovered) | | `Airlines::getList($sort)` (array) | `Airlines::all()->sortBy($property, SORT_NATURAL \| SORT_FLAG_CASE)` (Collection of `Airline`; properties are camelCase, e.g. `countryCode`) | | `Airlines::getOne($id)` | `Airlines::findById($id)` | | `Airlines::getListForSelect()` | `Airlines::options()` | | `php artisan airlines:migration` (generated seeder in `database/seeds`) | `php artisan airlines:install` / `airlines:seed` | | Config key `airlines.table_name` | `airlines.table` | | `charify` MySQL migration | removed. `code` and `country_code` are `CHAR` from the start | Row `id`s are unchanged, so existing foreign keys stay valid. The dataset was also cleaned: - 12 rows whose code was not a valid two-character designator (e.g. `&T`, `??`) were removed. - 4 exact duplicate rows were removed. - Missing country codes were filled in where the country was known. - Empty strings are now `null`. After upgrading, run `php artisan airlines:seed --prune` to update a seeded table. > [!WARNING] > The dev-master migration made `country_code` and `country_name` `NOT NULL`, but ten airlines in 1.0 have no country, so seeding an old table fails. Make the two columns nullable first, in a migration of your own: > > > > Or drop the old table and create it again with `php artisan airlines:install`.

## ๐Ÿงช Testing

## ๐Ÿ“„ License MIT. See [LICENSE](LICENSE).

All versions of laravel-airlines with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/validation Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package flairuk/laravel-airlines contains the following files

Loading the files please wait ...