Download the PHP package anouar-touati/algerian-cities-laravel without Composer

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

Algerian Cities Laravel Package

Grew tired of repeating the same step in every project to add address to your forms. I had the same frustration, which why I made this package to get you up and running with just few commands.

Acknowledgment

Dataset was taken from this repo

Status

This package is still under development. Use at your own discretion. You can open an issue for bugs or features you would like to be included in the future.

Instalation

If auto discovery does not work for you, add this under providers in config/app.php :

Usage

API

Call these json endpoints

Verb URI Description
Get /api/algeriancities/wilayas Get all wilayas

response format :

Verb URI Description
Get /api/algeriancities/dairas/{wilaya} Get all dairas at the specified wilaya code or name (arabic or french)

response format :

Verb URI Description
Get /api/algeriancities/communes/{daira} Get all communes at the specified daira name (arabic or french)

response format :

Verb URI Description
Get /api/algeriancities/postoffices/{commune} Get all post offices at the specified commune name (arabic or french)

response format :

Use through the AlgerianCitiesFacade

you can use the methods that the API controller is built with by including this line to the top of your file :

All of these methods return a Collection Mehod Parameters Description
getAllWilayas() returns all wilayas
getDairasUsingWilayaCode() $wilaya_code get list of dairas using wilaya's code
getDairasUsingWilayaName() $wilaya_name get list of dairas using wilaya's name in arabic or french
getCommunesUsingDairaName() $daira_name get list of communes using daira's name in arabic or french
getPostsUsingCommuneName() $commune_name get list of post offices using commune's name in arabic or french
getAllDairas() get list of all dairas
getAllCommunes() get list of all communes

Built-in address Blade component

You can add this ready to use component to your form which will provide the HTML dropdowns for selecting the address and the logic to populate them.

You can add styling by passing values to the :select_style and :label_style props as shown below.

You also need to have the Blade directive @stack with the word scripts like so @stack('scripts') under the closing body tag if you dont have that already.

Example:

Localization

English, French and Arabic translations are available by default for the address form.

If you want to override the default translations you may do so, publish the file to lang/vendor/algerian-cities-laravel by running the following command:


All versions of algerian-cities-laravel with dependencies

PHP Build Version
Package Version
No informations.
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 anouar-touati/algerian-cities-laravel contains the following files

Loading the files please wait ....