flarone/google-matrix-api
最新稳定版本:1.0.4
Composer 安装命令:
composer require flarone/google-matrix-api
包简介
Wrapper for the Google Distance Matrix API (and Laravel friendly)
README 文档
README
Requirements
- PHP >= 7.1.3, >= 8.0.*, >= 8.1.*, >= 8.2.*
- Laravel >= 5.5.*, 6.*, 7.*, 8.*, 9.*, 10.*
Installation
Require this package with composer.
composer require flarone/google-matrix-api
To publishes config config/google-matrix-api.php, use command:
php artisan vendor:publish --tag="google-matrix"
You must set your Google Maps API Key GOOGLE_MAPS_MATRIX_API_KEY in your .env file like so:
GOOGLE_MAPS_MATRIX_API_KEY=ThisIsMyGoogleApiKey
Usage
// Use Facades use Flarone\GoogleMatrix\Facades\GoogleMatrix; $matrix = GoogleMatrix::calculate('FromAddress', 'To Address'); // Use Helper Function $matrix = google_matrix('From Address', 'To Address');
Test
composer test
Credits
For more info, please visit https://developers.google.com/maps/documentation/distance-matrix/
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-21