Download the PHP package kossa/algerian-cities without Composer

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

GitHub Workflow Status (master) Total Downloads Latest Version GitHub Workflow Status (master) License

Laravel Algerian Cities : A comprehensive Laravel package to easily manage and interact with Algerian administrative divisions.

It provides functionality to load Wilayas (provinces) and Communes (municipalities) in both Arabic and French, complete with postal codes and precise latitude/longitude coordinates for each commune.

Features

Requirements

Installation

You can install the package via composer:

Next, publish the migrations and seeders by running the installation command:

Usage

Basic usage

The package provides two models: Wilaya and Commune.

A Wilaya has many Commune, and you can interact with them just like any other Eloquent models.

Using Helper Functions

The package provides several helper functions for convenient data retrieval:

Blade Templates / Views

You can leverage the provided helpers or models to populate <select> elements:

Using the Package as an API

This package includes api.php routes, allowing you to interact with the data through a RESTful API. Here are the available endpoints:

Verb URI Description
GET /api/wilayas Retrieve all Wilayas
GET /api/wilayas/{id} Retrieve a specific Wilaya by ID
GET /api/wilayas/{id}/communes Retrieve all Communes from a specific Wilaya by ID
GET /api/communes Retrieve all Communes
GET /api/communes/{id} Retrieve a specific Commune by ID
GET /api/search/wilaya/{q} Search Wilayas by name or Arabic name
GET /api/search/commune/{q} Search Communes by name or Arabic name

API Availability Toggle

You can enable or disable the Algerian Cities API endpoints by setting the following option in your .env file:


Future Planned Features

Contribution

We welcome all contributions! Please follow these guidelines:

  1. Document any changes in behavior — ensure README.md updated accordingly.
  2. Write tests to cover any new functionality.
  3. Please ensure that your pull request passes all tests.

Issues & Suggesting Features

If you encounter any issues or have ideas for new features, please open an issue.

We appreciate your feedback and contributions to help improve this package.

Credits

Security Reports

If you discover any security vulnerabilities, please report them by emailing the package maintainer at hadjikouceyla at gmail.

⭐ Support Us

If you find this package helpful, please consider giving it a ⭐ on GitHub ! Your support encourages us to keep improving the project. Thank you!

License

This package is open-sourced software licensed under the MIT License.


All versions of algerian-cities with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
laravel/framework Version ^10.0|^11.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 kossa/algerian-cities contains the following files

Loading the files please wait ....