yahaaylabs / gis.ph-sdk-php
Official PHP SDK for api.gis.ph, with first-class support for Laravel.
Installs: 2
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/yahaaylabs/gis.ph-sdk-php
Requires
- php: >=8.1
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^9.0|^10.0|^11.0|^12.0
Requires (Dev)
- mockery/mockery: ^1.5
- phpunit/phpunit: ^10.0
README
Official PHP SDK for api.gis.ph, with first-class support for Laravel.
Roadmap
Phase 1: Core SDK
- Basic HTTP client wrapper (Guzzle)
- Configuration management
- Barangay Resource (list, get, search)
- Province Resource (list, get)
- Error handling (structured exceptions)
Authentication
This SDK requires an Access Token or API Key from gis.ph. You can sign up and retrieve your credentials from your account dashboard.
Usage
Standard PHP
use GisPh\Client; $client = new Client(['access_token' => 'YOUR_TOKEN']); $results = $client->barangays()->search('Manila');
Laravel
use GisPh\Laravel\Facades\GisPh; $results = GisPh::barangays()->search('Manila');
Phase 2: Laravel Integration
- Laravel Service Provider
- Configuration publishing
- Facade support
- Automatic authentication injection
Phase 3: Advanced Features
- Geographical utilities
- Result caching (Laravel cache integration)
- Metadata helpers
Local Development & Testing
To test this SDK locally in another project (e.g., a Laravel application) without publishing it to Packagist:
- In your consumer project's
composer.json, add this repository:{ "repositories": [ { "type": "path", "url": "../gis.ph-sdk-php" } ] } - Run the install command:
composer require yahaaylabs/gis.ph-sdk-php:dev-main
Project Structure
...