Download the PHP package brightweb/countries without Composer

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

BrightWeb/Countries Documentation

Welcome to the documentation for BrightWeb/Countries, a Laravel package designed to provide comprehensive data about countries, states, cities, and currency symbols. With over 246 countries supported, this package aims to streamline the process of managing geographic and currency-related information within your Laravel applications.

Installation

To get started with BrightWeb/Countries, follow these simple steps:

Install the package via Composer:

composer require brightweb/countries

Run the migration to populate the database with country, state, and city data:

php artisan migrate

Usage

Once the package is installed and the database is populated, you can start leveraging its functionality within your Laravel application.

Retrieving Countries

To retrieve a list of all countries, you can use the Country model provided by the package:

use BrightWeb\Countries\Models\Country;

$countries = Country::all();

This will return a collection of all countries along with their associated data such as states, cities, and currency symbols.

Retrieving States and Cities

States and cities are related to countries through foreign key relationships. You can retrieve states and cities belonging to a specific country like so.

Retrieve states of a country

$states = Country::find($countryId)->states;

Retrieve cities of a state

$cities = State::find($stateId)->cities;

$cities = $country->cities;

Retrieving Currency Symbols

$currencySymbol = Country::find($countryId)->currency;

Database Structure

The database structure of the BrightWeb/Countries package consists of the following tables:

countries: Contains information about countries including their names and currency symbols.

states: Stores data about states or provinces within countries.

cities: Holds information about cities within states or provinces.

Contributing

Contributions to the BrightWeb/Countries package are welcome! If you encounter any bugs, have feature requests, or would like to contribute code, please feel free to open an issue or submit a pull request on GitHub.

Support

For any questions, concerns, or support requests, please don't hesitate to reach out to our me at [email protected].

License

BrightWeb/Countries is open-source software licensed under the MIT License.

Credits

This package was developed and is maintained by the BrightWeb team. Special thanks to all contributors who have helped improve this package.

Thank you for choosing BrightWeb/Countries for your Laravel application! We hope it serves you well in managing geographic and currency-related data efficiently.


All versions of countries with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 brightweb/countries contains the following files

Loading the files please wait ....