Download the PHP package mahdiabbariki/iranprovinces without Composer
On this page you can find all versions of the php package mahdiabbariki/iranprovinces. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mahdiabbariki/iranprovinces
More information about mahdiabbariki/iranprovinces
Files in mahdiabbariki/iranprovinces
Package iranprovinces
Short Description This package includes models and tables for provinces and their respective cities, which will be integrated into your project.
License MIT
Informations about the package iranprovinces
Iran Provinces Package
This package offers functionality to manage Iran's provinces and cities through database tables. It comes with flexible configuration options, allowing you to:
- Choose whether or not to create a table for cities.
- Decide whether to include latitude and longitude data in the cities table.
- Add or exclude timestamps in the tables.
Persian Install Guide
Installation
To get started, run the following command:
For Laravel Versions Prior to v6
For Laravel versions older than v6, you need to add the following line to the providers
array in the config/app.php
file:
the package is successfully integrated into your project.
After that, run the following command to publish the package's configuration, migration, and seeder files:
Make sure to edit the configuration file ( config/iranProvinces.php
) to match your specific requirements. The default configurations are suitable for most users.
Once you've customized the configuration, run your migrations.
Seeding
You have two options for seeding the data.
You can execute this command to run the designated seeders included with this package:
Alternatively, you can add the following lines to the run
method in the DatabaseSeeder
class located in the database/seeders
directory:
then you can use the built-in laravel seed command:
Now, your models and tables are ready for use.
Examples
Here are some examples of how to use them:
Contribution
If you encounter any bugs, please report them to [email protected]. Your contributions are welcome!