Download the PHP package flairuk/laravel-cities without Composer

On this page you can find all versions of the php package flairuk/laravel-cities. 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-cities

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

**Laravel Cities** โ€” More than 9,000 IATA city codes (`LON`, `NYC`, `PAR`, โ€ฆ) for Laravel 12 and 13. In IATA's scheme a city code groups the airports that serve a city, as `LON` does for Heathrow, Gatwick and Stansted. This package lists the city codes; it does not map them to airports. - **No database required.** Look cities up through a facade backed by an in-memory dataset. - **Typed results.** Every lookup returns readonly `City` objects in Laravel collections keyed by code. - **Validation rule.** `new CityCode` accepts known codes only. - **Optional table.** Publish a migration and seed a `cities` table when other tables need to reference cities.

๐Ÿ“ฆ 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 `Cities` facade automatically.

## ๐Ÿš€ Usage ### Select options ### Validation

## ๐Ÿ’พ Database table (optional) 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 `CITIES_TABLE` and `CITIES_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-cities` | `flairuk/laravel-cities` | | `ijeffro\Cities\โ€ฆ` namespace | `FLAIRUK\Cities\โ€ฆ` | | Facade `ijeffro\Cities\CitiesFacade` | `FLAIRUK\Cities\Facades\Cities` (auto-discovered) | | `Cities::getList($sort)` (array) | `Cities::all()->sortBy($property, SORT_NATURAL \| SORT_FLAG_CASE)` (Collection of `City`; properties are camelCase, e.g. `countryCode`) | | `Cities::getOne($id)` | `Cities::findById($id)` or `Cities::find($code)` | | `Cities::getListForSelect()` (keyed by id) | `Cities::options('id')` | | `php artisan cities:migration` | `php artisan cities:install` / `cities:seed` | | Config key `cities.table_name` | `cities.table` | | Field / column `iso_3166_3` | **`code`**. It was always an IATA city code, not an ISO 3166 code | Row `id`s are unchanged. If you have an existing table, rename the column before re-seeding:

## ๐Ÿงช Testing

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

All versions of laravel-cities 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-cities contains the following files

Loading the files please wait ...