Download the PHP package shimadotdev/iran-regions without Composer

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

Latest Stable Version Total Downloads Tests License PHP Version Require

Iran Regions Laravel Package

A Laravel package containing province and city data of Iran, including calling codes, along with geolocation functionality. Ideal for managing location-based information within Laravel apps.

Installation

You can install the package via Composer by running:

After installing the package, run the following Artisan command to set up the necessary migrations and seed the database with provided data:

This command will create two tables named cities and provinces in your database, seeded with the required data.

Usage

Once the package is installed and migrations are run, you can start using the provided functionality.

Example Usage

You can access province and city data using the Iran Class:

As you see, you can also utilize Laravel's Eloquent ORM to create custom queries and interact with the data as usual.

Localization Support

The package supports two languages: English (en) and Persian (fa) for all city and province names. You can access them using their respective slugs:

Database Structure

The package creates the following tables in your database:

cities Table

Column Description
id Primary key
slug City slug
is_active Active status
province_id Foreign key to provinces table
latitude City latitude
longitude City longitude

provinces Table

Column Description
id Primary key
slug Province slug
is_active Active status
latitude Province latitude
longitude Province longitude
calling_code Calling code of the province

Testing

You can run the automated tests for the package using PHPUnit:

Contributing

Contributions are welcome! If you have any ideas for improvements or find any issues, please submit them through GitHub issues or create a pull request.

Security Vulnerabilities

If you discover any security vulnerabilities, please report them via email to [email protected]

Credits

This package is developed and maintained by Shima.Dev

License

This package is open-source software licensed under the MIT licensev.


All versions of iran-regions with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
laravel/framework Version ^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 shimadotdev/iran-regions contains the following files

Loading the files please wait ....