Download the PHP package cyberionsys/laravel-countries without Composer

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

Laravel Countries

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This package provides ready-to-use application models and seeds the database with ISO data from various sources. This package can be used in multi-language apps and supports Country/Language/Currency names in almost any locale.

Included datasets

Unlike other packages, this one also includes relevant data relationships, such as:

Installation

You can install the package via composer:

The latest version of this package requires PHP version 8.1 or above.

Migrations

Optionally, you can publish the database migrations with:

By default, this database includes all country/language/&currency names translated into English, German, French, and Spanish. If you want to compile your own database with other languages, please see the instructions here.

Config

Optionally, you can publish the config file with:

In the config you can define, which translations of country/language/currency names you want to store in your DB.

This is the contents of the published config file:

After making changes to the config you need to re-migrate your database:

Warning This will recreate your entire database. Please take appropriate cautions before running it

Usage

Country model

Language model

Currency model

Query relationships

All models have pre-defined many-to-many relationships that can be queried:

Localized names

Each of the package models (Country, Language, Currency) has a ->name attribute, which will be displayed in the app's locale, using the spatie/laravel-translatable package. The default config will migrate localized names for en, de, fr, and es. This can be adjusted in the config. The config app.locale and app.fallback_locale are automatically included.

Attribute casting

If you already use ISO codes in your models, you can enrich them by casting them as Country/Language/Currency model:

Testing

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-countries with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^10.0
spatie/laravel-package-tools Version ^1.16.0
spatie/laravel-translatable Version ^6.5
umpirsky/currency-list Version ^1.1
umpirsky/language-list Version ^1.1
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 cyberionsys/laravel-countries contains the following files

Loading the files please wait ....