sportscar03/psgc-database
Composer 安装命令:
composer require sportscar03/psgc-database
包简介
(Customized) This is a simple CLI tool to easily add Philippine Standard Geographic Code (PSGC) data to your database.
README 文档
README
A Laravel package to import the Philippine Standard Geographic Code (PSGC) into your database with optimized structure for regions, provinces, cities/municipalities, and barangays.
Installation
You can install the package via composer:
composer require sportscar03/psgc-database:dev-main
You can publish the config file with:
php artisan vendor:publish --tag="psgc-database-config"
This will create a config file:
<?php return [ 'source' => public_path('psgc/latest.xlsx'), ];
Usage
Step 1: Publish and run the migrations
php artisan vendor:publish --tag="psgc-database-migrations"
php artisan migrate
Step 2: Download the latest PSGC data
php artisan psgc-db:download
This will download the latest PSGC Excel file and save it to your storage/public directory.
Step 3: Convert the Excel file into tables
php artisan psgc-db:convert
This will parse the Excel file and insert the data into the following tables:
regionsprovincescitiesbarangays
License
This package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-18