bernskioldmedia/laravel-harvest
Composer 安装命令:
composer require bernskioldmedia/laravel-harvest
包简介
This is an API wrapper class for the Harvest Time Tracking API.
README 文档
README
This package adds a fluent way of interacting with the Harvest time tracking system and its API.
Installation
You can install the package via composer:
composer require bernskioldmedia/laravel-harvest
You can publish the config file with:
php artisan vendor:publish --tag="harvest-config"
This is the contents of the published config file:
return [ /** * The API key used for authenticating with the Harvest API. */ 'api_key' => env('HARVEST_API_KEY', ''), /** * The Account ID number from Harvest that you want to use. */ 'account_id' => env('HARVEST_ACCOUNT_ID', ''), /** * The user agent (application name) is sent through to * Harvest so that they can identify who requests come from. */ 'application_name' => env('HARVEST_APP_NAME', env('APP_NAME')), /** * The contact e-mail address for the application is required * so that Harvest can get in touch for any reason. */ 'application_email' => env('HARVEST_APP_EMAIL', ''), /** * The Base URL for the Harvest API including the version. * This package currently only supports V2 of the API. */ 'base_url' => env('HARVEST_API_URL', 'https://api.harvestapp.com/v2'), ];
Usage
The package provides a convenient facade to interact with all resources. The package will let you consume the API through fluent methods, but will not touch or map the response coming from the API. Please see the Harvest API docs for more information on responses.
The package currently supports all Harvest API resources, as well as their reporting endpoints. Your IDE should discover them on the Harvest Facade when typing.
When getting lists using the all method there are also fluent filtering methods to help you filter. Additionally some
resources have "actions" as well. The names of these functions match mostly to the parameters in the Harvest API docs.
use BernskioldMedia\Harvest\Facades\Harvest; // Get all clients from Harvest. Harvest::clients()->all(); // Show only active clients from Harvest. Harvest::clients()->active()->all(); // Get a single client from Harvest. Harvest::clients()->get(123); // Create a client from Harvest. Harvest::clients()->create(['name' => 'My new client']); // Update a client in Harvest. Harvest::clients()->update(123, ['name' => 'My new name']); // Delete a client from Harvest. Harvest::clients()->delete(123); // Mark an invoice as sent. Harvest::invoices()->send(1);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
bernskioldmedia/laravel-harvest 适用场景与选型建议
bernskioldmedia/laravel-harvest 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.15k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「bernskioldmedia」 「laravel-harvest」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bernskioldmedia/laravel-harvest 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bernskioldmedia/laravel-harvest 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bernskioldmedia/laravel-harvest 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel package to automatically translate the application's language files into a chosen language using DeepL.
A Laravel package to automatically translate the application's language files into a chosen language using DeepL.
A Laravel package to consume the Fortnox API.
A Laravel and Livewire wrapper for Highcharts.
Access and manage Matomo from Laravel.
Alfabank REST API integration
统计信息
- 总下载量: 1.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-15