Download the PHP package open-afghanistan/provinces without Composer

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

Laravel Package: Afghanistan Provinces & Districts

Latest Version on Packagist Total Downloads Repo Size Repo Size

Introduction:

The Laravel package "provinces" provides essential resources for managing Afghanistan's provinces and districts within your Laravel application. This package includes models, migrations, seeders, and factories to facilitate the integration of Afghanistan's administrative divisions into your project.

Requirements:

To use this package, ensure your Laravel application meets the following requirements:

Installation:

You can effortlessly install the "provinces" package using Composer. Open your terminal and run the following command:

Migrations:

After successful installation, you need to publish the migration files. Use the following Artisan command:

This command will generate a migration file that sets up the necessary tables for provinces and districts in your database.

Seeders:

The package includes a handy ProvincesSeeder that populates all 34 Afghanistan provinces along with their respective districts. You can call this seeder in your project's database seeder file as follows:

If you only wish to seed specific provinces, you can call their individual seeder classes:

Factories:

To facilitate testing, this package provides factories for both provinces and districts. You can create instances of these models in your tests with ease:

For provinces:

For districts:

Contribution Guide:

We welcome contributions to enhance this package. If you'd like to contribute by adding districts to any province, specific seeder files are available for each province to simplify the process. Please run the ./vendor/bin/pint command before you push any piece of code.

License:

The "provinces" package is open-source software distributed under the MIT License. You are free to use and modify it to suit your project's requirements.

Feel free to utilize this package to manage Afghanistan's administrative divisions effortlessly in your Laravel application.


All versions of provinces with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
illuminate/database Version >=9.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 open-afghanistan/provinces contains the following files

Loading the files please wait ....