Download the PHP package flairuk/laravel-world without Composer
On this page you can find all versions of the php package flairuk/laravel-world. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download flairuk/laravel-world
More information about flairuk/laravel-world
Files in flairuk/laravel-world
Download flairuk/laravel-world
More information about flairuk/laravel-world
Files in flairuk/laravel-world
Vendor flairuk
Package laravel-world
Short Description Countries, cities, airports, airlines and aircraft for Laravel, joined up: one facade over the FLAIRUK data packages.
License MIT
Homepage https://github.com/FLAIRUK/laravel-world
Package laravel-world
Short Description Countries, cities, airports, airlines and aircraft for Laravel, joined up: one facade over the FLAIRUK data packages.
License MIT
Homepage https://github.com/FLAIRUK/laravel-world
Please rate this library. Is it a good library?
Informations about the package laravel-world
**Laravel World** โ Countries, cities, airports, airlines and aircraft for Laravel 12 and 13, joined up behind one facade.
- **Every dataset.** Installs all five FLAIRUK data packages, each still usable on its own.
- **Joined through the country.** Find a country by any of its codes, then its cities, airports and airlines.
- **One search.** Search every dataset by code or name in one call.
- **No database required.** Everything is looked up in memory. A command publishes and seeds all five tables when you need them.
๐ฆ Installation ยท ๐งญ Datasets ยท ๐ Usage ยท ๐พ Database tables
## ๐ฆ Installation Requires PHP 8.2 or later with Laravel 12, or PHP 8.3 or later with Laravel 13. Laravel discovers the service providers and the `World` facade automatically.
## ๐งญ Datasets Each dataset is its own package, and `laravel-world` requires all five: | Package | Data | Facade | | --- | --- | --- | | [flairuk/laravel-countries](https://github.com/FLAIRUK/laravel-countries) | ISO 3166 countries | `Countries` | | [flairuk/laravel-cities](https://github.com/FLAIRUK/laravel-cities) | IATA city codes | `Cities` | | [flairuk/laravel-airports](https://github.com/FLAIRUK/laravel-airports) | IATA airport codes | `Airports` | | [flairuk/laravel-airlines](https://github.com/FLAIRUK/laravel-airlines) | IATA airline designators | `Airlines` | | [flairuk/laravel-aircrafts](https://github.com/FLAIRUK/laravel-aircrafts) | IATA aircraft type codes | `Aircrafts` | Their facades, validation rules and models all work as their READMEs describe. `World` adds what none of them can do alone: links between the datasets.
## ๐ Usage You can also type-hint `FLAIRUK\World\World` to have it injected. ### Countries and what is in them A country can be given by its alpha-2 (`GB`), alpha-3 (`GBR`) or numeric (`826`) code, or as a `Country` object. An unknown country gives an empty collection. `profile()` returns all of it at once, as a `CountryProfile` you can return straight from a controller: ### The country of a place `countryOf()` returns null for the few airlines with no country. ### What a code could mean Codes overlap between the datasets. `code()` returns every match for exactly that code, keyed by kind, and leaves out the kinds with no match: The keys are `country`, `city`, `airport`, `airlines` and `aircraft`. `airlines` is a collection, because IATA re-issues designators. ### Searching everything `search()` matches each dataset's codes and names, and returns up to ten results per kind (`countries`, `cities`, `airports`, `airlines`, `aircraft`), leaving out the kinds with none. ### Each dataset The underlying lookups are available from `World` too, so one import is enough: These are the same singletons the `Countries`, `Cities`, `Airports`, `Airlines` and `Aircrafts` facades use.
## ๐พ Database tables (optional) To publish all five configs and migrations and then, if you agree, migrate and seed every table: It skips any migration that an earlier install already published, including one from a dataset's own `*:install` command, so it is safe to run again. To update the tables after upgrading the packages: `world:seed` runs each dataset's own seed command: `countries:seed`, `cities:seed`, `airports:seed`, `airlines:seed` and `aircrafts:seed`. Each table's name and connection are set in that dataset's config file.
## ๐งช Testing
## ๐ License The MIT License (MIT). See [LICENSE](LICENSE) for details.
All versions of laravel-world with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
flairuk/laravel-aircrafts Version ^1.0
flairuk/laravel-airlines Version ^1.0
flairuk/laravel-airports Version ^1.0
flairuk/laravel-cities Version ^1.0
flairuk/laravel-countries Version ^1.0
illuminate/console Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
flairuk/laravel-aircrafts Version ^1.0
flairuk/laravel-airlines Version ^1.0
flairuk/laravel-airports Version ^1.0
flairuk/laravel-cities Version ^1.0
flairuk/laravel-countries Version ^1.0
illuminate/console Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
The package flairuk/laravel-world contains the following files
Loading the files please wait ...