Download the PHP package kalimeromk/countries without Composer

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

Countries

[Travis]() Total Downloads

Usage

Laravel Countries is a package for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries including states and cities .

Installation

You can install this package via Composer:

composer require kalimeromk/countries

Or form composer.json file

Add kalimeromk/countries to composer.json.

"kalimeromk/countries": "*"

Run composer update to pull down the latest version of Country List.

Edit app/config/app.php and add the provider and filter

'providers' => [
    'Kalimeromk\Countries\CountriesServiceProvider',
]

Now add the alias.

'aliases' => [
    'Countries' => 'Kalimeromk\Countries\CountriesServiceProvider',
]

Model

You can start by publishing the configuration. This is an optional step, it contains the table names for needed table and does not need to be altered. If the default names countries,states,cities suits you, leave it. Otherwise, run the following command

$ php artisan vendor:publish --tag=countries-config

If need to make some changes to migrate file use flowing command to generate the migration file:

$ php artisan vendor:publish --tag=countries-migration

It will generate the migration in databases/migrations dir

In the package we have tree models Country,State,City with needed relation to be used out of the box but if changes just extend models :)

To finish everything need to seed the data into the table, so 1st need to run

$ php artisan vendor:publish --tag=countries-seeders 

and add this code to DatabaseSeeder class

//Seed the countries
 $this->call(CountriesSeeder::class);
 $this->call(StatesSeeder::class);
 $this->call(CitiesSeeder::class);

You may now run it with the artisan migrate command:

$ php artisan migrate --seed

After running this command the filled countries table will be available

Testing

Run the tests with:

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

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


All versions of countries with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 kalimeromk/countries contains the following files

Loading the files please wait ....