承接 tuki/http-client-for-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tuki/http-client-for-laravel

最新稳定版本:v1.0.3

Composer 安装命令:

composer require tuki/http-client-for-laravel

包简介

Laravel adapter package for tuki/http-client.

README 文档

README

Laravel integration layer for tuki/http-client. Adds auto-discovery, a facade, database persistence, async sink dispatch, framework events, and first-class test support — all wired to the Laravel container.

Profiles can also define reusable authentication through seal providers, so a bearer token or HTTP Basic setup lives in config and is applied automatically to every request sent through that profile.

Requirements

  • PHP: 7.4.* || 8.*
  • Laravel: >= 8.0
  • PHP extensions: ext-curl, ext-json
  • Core dependency: tuki/http-client:^1.0

Installation

composer require tuki/http-client-for-laravel

Publish config and migrations, then migrate:

php artisan vendor:publish --provider="Tuki\HttpClientForLaravel\TukiHttpClientForLaravelServiceProvider" --tag=config
php artisan vendor:publish --provider="Tuki\HttpClientForLaravel\TukiHttpClientForLaravelServiceProvider" --tag=migrations
php artisan migrate

Define your first profile in config/tuki_http_client.php:

'default_profile' => 'pokemon_api',

'profiles' => [
    'pokemon_api' => [
        'base_uri' => 'https://pokeapi.co/api/v2',
        'timeout' => 20,
        'connect_timeout' => 10,
    ],
],

Send a request via the facade:

use Tuki\HttpClientForLaravel\Facades\HttpClient;

$response = HttpClient::newRequest('pokemon.search')
    ->to('GET', '/pokemon/pikachu')
    ->expectsJson()
    ->execute();

$payload = $response->getJsonData();

→ For a complete setup walkthrough, see Installation and first success.

Documentation

License

MIT. See LICENSE.

Validation

composer test
composer stan
composer coverage

From the workspace root, the recommended execution path is the root Makefile:

make laravel-qa
make laravel-coverage

Inside this package, use Makefile targets directly. They support both local Docker and CI/direct execution:

make qa                 # local default: Docker mode
make qa USE_DOCKER=0    # CI/direct mode (no docker compose wrapper)

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固