定制 masmaleki/zoho-one 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

masmaleki/zoho-one

Composer 安装命令:

composer require masmaleki/zoho-one

包简介

Zoho all in one for Laravel

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Laravel package for integration with the Zoho v3 API (CRM + Books + Inventory) with multi-organization token support.

Installation

Install the package via Composer:

composer require masmaleki/zoho-one

Publish and run the migrations:

php artisan vendor:publish --tag="zoho-one-migrations"
php artisan migrate

Publish the config file:

php artisan vendor:publish --tag="zoho-one-config"

The config is published to config/zoho-one.php. Reference values in your app via config('zoho-one.*').

Upgrading from masmaleki/zoho-v3 or masmaleki/zoho-v4

This package was previously published as masmaleki/zoho-v3 and briefly as masmaleki/zoho-v4. The package name no longer carries a version suffix; the underlying database table is still named zoho_v4 (it is an internal implementation detail and is not renamed again to avoid forcing another migration on existing installs).

To upgrade:

  1. Swap the Composer requirement:

    composer remove masmaleki/zoho-v3   # or masmaleki/zoho-v4
    composer require masmaleki/zoho-one
  2. Publish and run the migrations. Two guarded upgrade migrations ship with the package (both are idempotent and safe to re-run):

    php artisan vendor:publish --tag="zoho-one-migrations"
    php artisan migrate
    • rename_zoho_v3_to_zoho_v4_table renames the legacy zoho_v3 table to zoho_v4 (no-op if you are already on zoho_v4 or on a fresh install).
    • add_organization_id_to_zoho_v4_table adds the organization_id column required by the multi-organization feature (no-op if already present).
  3. Re-publish the config (it has been renamed to config/zoho-one.php) and copy any custom values from your old config/zoho-v3.php or config/zoho-v4.php:

    php artisan vendor:publish --tag="zoho-one-config"

    Update any config('zoho-v3.*') or config('zoho-v4.*') calls in your application code to config('zoho-one.*').

Compatibility

Component Range
PHP 8.2 / 8.3 / 8.4
Laravel 10.x / 11.x / 12.x / 13.x

Zoho Books customization resources

The package includes helpers for Zoho Books customization resources. These methods use the configured Books API base URL from config('zoho-one.books_api_base_url'), the saved Zoho access token, and the Zoho Books organization ID passed to the method.

use Masmaleki\ZohoAllInOne\ZohoAllInOne;

$organizationId = 123456789;

$customField = ZohoAllInOne::createBooksCustomField([
    'label' => 'Internal Number',
    'data_type' => 'string',
], $organizationId);

$webhook = ZohoAllInOne::createBooksWebhook([
    'name' => 'Sales order sync',
    'url' => 'https://example.com/api/zoho/books/webhook',
], $organizationId);

$customFunction = ZohoAllInOne::createBooksCustomFunction([
    'name' => 'Sync sales order',
    'script' => '// Deluge script body',
], $organizationId);

$customAction = ZohoAllInOne::createBooksCustomAction([
    'name' => 'Run sync',
], $organizationId);

Available helper groups:

ZohoAllInOne::getBooksCustomFields($organizationId, $query = []);
ZohoAllInOne::createBooksCustomField($data, $organizationId);
ZohoAllInOne::getBooksCustomField($fieldId, $organizationId);
ZohoAllInOne::updateBooksCustomField($fieldId, $data, $organizationId);
ZohoAllInOne::deleteBooksCustomField($fieldId, $organizationId);

ZohoAllInOne::getBooksWebhooks($organizationId, $query = []);
ZohoAllInOne::createBooksWebhook($data, $organizationId);
ZohoAllInOne::getBooksWebhook($webhookId, $organizationId);
ZohoAllInOne::updateBooksWebhook($webhookId, $data, $organizationId);
ZohoAllInOne::deleteBooksWebhook($webhookId, $organizationId);

ZohoAllInOne::getBooksCustomFunctions($organizationId, $query = []);
ZohoAllInOne::createBooksCustomFunction($data, $organizationId);
ZohoAllInOne::getBooksCustomFunction($functionId, $organizationId);
ZohoAllInOne::updateBooksCustomFunction($functionId, $data, $organizationId);
ZohoAllInOne::deleteBooksCustomFunction($functionId, $organizationId);

ZohoAllInOne::getBooksCustomActions($organizationId, $query = []);
ZohoAllInOne::createBooksCustomAction($data, $organizationId);
ZohoAllInOne::getBooksCustomAction($actionId, $organizationId);
ZohoAllInOne::updateBooksCustomAction($actionId, $data, $organizationId);
ZohoAllInOne::deleteBooksCustomAction($actionId, $organizationId);

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

masmaleki/zoho-one 适用场景与选型建议

masmaleki/zoho-one 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20 次下载、GitHub Stars 达 4, 最近一次更新时间为 2026 年 04 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「Zoho」 「masmaleki」 「zoho-one」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 masmaleki/zoho-one 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 masmaleki/zoho-one 我们能提供哪些服务?
定制开发 / 二次开发

基于 masmaleki/zoho-one 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-22