spikkl/spikkl-php-laravel-client
Composer 安装命令:
composer require spikkl/spikkl-php-laravel-client
包简介
Spikkl API client wrapper for Laravel
README 文档
README
Spikkl for Laravel
Spikkl-php-laravel-client incorporates the Spikkl API into your Laravel or Lumen project.
Requirements
- Get yourself a free Spikkl account. No sign up costs.
- Follow a few steps to enable a suitable subscription to talk to the API.
- A valid API key which can be generated from your Spikkl dashboard.
- PHP >= 7.1.
- Laravel (or Lumen) >= 5.5
Installation
Add Spikkl-php-laravel-client to your composer file via the composer require command:
$ composer require spikkl/spikkl-php-laravel-client:^1.0
Or add it to composer.json manually:
"require": { "spikkl/spikkl-php-laravel-client": "^1.0" }
Spikkl-php-laravel-client's service provider will be automatically registered using Laravel's auto-discovery feature.
Note: for Lumen you have to add the Spikkl facade and service provider manually to: bootstrap/app.php:
$app->withFacades(true, [ 'Spikkl\Laravel\Facades\Spikkl' => 'Spikkl' ]); $app->register(Spikkl\Laravel\ServiceProvider::class);
Configuration
You will only need to add the SPIKKL_API_KEY variable to your .env file.
SPIKKL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Example usage
Here you can see an example of just how simple this package is to use.
Location lookup by supported country code, postal code, street number, and street number suffix.
$results = Spikkl::api()->lookup('nld', '2611HB', '175', null);
Location reverse lookup by supported country code, longitude, and latitude.
$results = Spikkl::api()->reverse('nld', 4.354901, 52.012133);
Note: longitude and latitude values will be rounded to 9 decimal places.
Global helper method
For your convenience we have added the global spikkl() helper function. It is an easy shortcut to the Spikkl::api() facade accessor.
// Using facade accessor $results = Spikkl::api()->lookup('nld', '2611HB', '175', null); // Using global helper function $results = spikkl()->lookup('nld', '2611HB', '175', null);
License
BSD (Berkeley Software Distribution) License. Copyright (c) 2020, Spikkl
Support
Contact: www.spikkl.nl — info@spikkl.nl
spikkl/spikkl-php-laravel-client 适用场景与选型建议
spikkl/spikkl-php-laravel-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.07k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 02 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「client」 「validation」 「laravel」 「postal code」 「spikkl」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 spikkl/spikkl-php-laravel-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 spikkl/spikkl-php-laravel-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 spikkl/spikkl-php-laravel-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Mock PSR-18 HTTP client
Adds request-parameter validation to the SLIM 3.x PHP framework
Asynchronous MQTT client built on React
A jQuery augmented PHP library for creating and validating HTML forms
A Laravel validator for delimiter-separated list of emails.
统计信息
- 总下载量: 1.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2020-02-16