salibhdr/typhoon-iran-cities
Composer 安装命令:
composer require salibhdr/typhoon-iran-cities
包简介
A laravel package for importing all regions such as provinces, counties, cities, city districts, rural districts and villages of iran into database accurately
关键字:
README 文档
README
English · فارسی
A Laravel package that imports Iran's administrative divisions — provinces, counties, sectors, cities, city districts, rural districts, and villages — into your database with Artisan commands. Includes Eloquent models, relationships, and optional city coordinates.
composer require salibhdr/typhoon-iran-cities php artisan iran:init --no-interaction --force
Requires Laravel 13 and PHP 8.3+ on the latest release. Older Laravel apps should use ^3.1 — see the version matrix.
Documentation
Full documentation lives in docs/ — available in English and Persian (فارسی).
| English | فارسی | |
|---|---|---|
| Start here | English docs | مستندات فارسی |
| Hub / TOC | docs/README.md | same |
Table of contents
| Topic | EN | FA |
|---|---|---|
| Introduction | → | → |
| Requirements & versioning | → | → |
| Installation | → | → |
| Quick start | → | → |
| Storage modes (separate / unite) | → | → |
| Commands reference | → | → |
| Models & relationships | → | → |
| Status field | → | → |
| City coordinates | → | → |
| Upgrade guide | → | → |
| FAQ & troubleshooting | → | → |
| Testing & contributing | → | → |
Features at a glance
- All seven official division levels with relational data and codes
- Separate tables (default) or unite mode (single
iran_regionstable) - Selective import with
--target(e.g. cities only) - Published migrations and models — you own the schema
- Active/inactive
statuswith hierarchy-aware scopes - City latitude/longitude via
--with-city-coordinates - Re-import with
--freshwhen upstream data updates
Quick example
use App\Models\IranCity; IranCity::active() ->with('county.province') ->orderBy('name') ->get();
Testing
composer test composer test:coverage # requires PCOV
Coverage runs in CI on every push and PR — Codecov.
Package dependency
Published models extend SaliBhdr\TyphoonIranCities\Models\* — keep this package installed after iran:publish:models.
Published migrations are self-contained and do not reference the package namespace.
Changelog & upgrades
See CHANGELOG.md and the upgrade guide (EN) / راهنمای ارتقا (FA).
License & credits
MIT License — Salar Bahador.
Data based on ahmadazizi/iran-cities v3.
Issues: GitHub · Contributions welcome.
Built with ❤ for you.
salibhdr/typhoon-iran-cities 适用场景与选型建议
salibhdr/typhoon-iran-cities 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21.79k 次下载、GitHub Stars 达 61, 最近一次更新时间为 2020 年 02 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「city」 「locations」 「province」 「regions」 「iran」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 salibhdr/typhoon-iran-cities 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 salibhdr/typhoon-iran-cities 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 salibhdr/typhoon-iran-cities 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Maps in minutes. Powered by the Google Maps API.
Philippines region, province, cities/municipalities and barangays Laravel migration and table seeder.
A Locations app for Strata
Metamel Addresses is a polymorphic Laravel package, for address book management. You can add addresses to any eloquent model with ease.
PHP client for the IPLocate.io geolocation API
ip to city for 17mon.cn
统计信息
- 总下载量: 21.79k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 61
- 点击次数: 37
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-12
