tigerheck/laravel-vcita 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

tigerheck/laravel-vcita

最新稳定版本:v1.0.17

Composer 安装命令:

composer require tigerheck/laravel-vcita

包简介

Laravel wrapper for vCita APIs

README 文档

README

Latest Version on Packagist Total Downloads

A Laravel wrapper for vCita API.

Install

Via Composer

$ composer require tigerheck/laravel-vcita

Configuration

Laravel vCita requires connection configuration. To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish --provider="TigerHeck\Vcita\VcitaServiceProvider"

Add VCITA_BASE_URL= and VCITA_API_KEY= to your enviroment configuraiton file

Usage

See documention for params and others at vCita docs

Examples with \Http::vcita()

Get clients

$response = \Http::vcita()->get("/platform/v1/clients", [
    'search_term' => $email,
    'search_by' => 'email',
]);

Create a Client

$response = \Http::vcita()->post("/platform/v1/clients", [
    'address'           => $address,
    'custom_field1'     => $custom_field1,
    'custom_field2'     => $custom_field2,
    'custom_field3'     => $custom_field3,
    'email'             => $email,
    'first_name'        => $first_name,
    'last_name'         => $last_name,
    'phone'             => $phone,
    'source_campaign'   => $source_campaign,
    'source_channel'    => $source_channel,
    'source_name'       => $source_name,
    'source_url'        => $source_url,
    'staff_id'          => $staff_id,
    'status'            => $status,
    'tags'              => $tags,
]);

Updates a Client

$response = \Http::vcita()->put("/platform/v1/clients/{$client_id}", [
    'address'           => $address,
    'custom_field1'     => $custom_field1,
    'custom_field2'     => $custom_field2,
    'custom_field3'     => $custom_field3,
    'email'             => $email,
    'first_name'        => $first_name,
    'last_name'         => $last_name,
    'phone'             => $phone,
    'source_campaign'   => $source_campaign,
    'source_channel'    => $source_channel,
    'source_name'       => $source_name,
    'source_url'        => $source_url,
    'staff_id'          => $staff_id,
    'status'            => $status,
    'tags'              => $tags,
]);

Deletes a Client by Id

$response = \Http::vcita()->delete("/platform/v1/clients/{$client_id}");

Retrieves a Client by Id

$response = \Http::vcita()->get("/platform/v1/clients/{$client_id}");

Examples with app("vcita")

Support client api with this method, provide support for rest of api later on.

Get clients

$response = app("vcita")->allClients([
    'search_term' => $email,
    'search_by' => 'email',
]);

Get clients (response with specific access point)

$response = app("vcita")->allClients([
    'search_term' => $email,
    'search_by' => 'email',
], 'data.clients');

Create a Client

$response = app("vcita")->createClient([
    'address'           => $address,
    'custom_field1'     => $custom_field1,
    'custom_field2'     => $custom_field2,
    'custom_field3'     => $custom_field3,
    'email'             => $email,
    'first_name'        => $first_name,
    'last_name'         => $last_name,
    'phone'             => $phone,
    'source_campaign'   => $source_campaign,
    'source_channel'    => $source_channel,
    'source_name'       => $source_name,
    'source_url'        => $source_url,
    'staff_id'          => $staff_id,
    'status'            => $status,
    'tags'              => $tags,
]);

Updates a Client

$response = app("vcita")->updateClient($client_id, [
    'address'           => $address,
    'custom_field1'     => $custom_field1,
    'custom_field2'     => $custom_field2,
    'custom_field3'     => $custom_field3,
    'email'             => $email,
    'first_name'        => $first_name,
    'last_name'         => $last_name,
    'phone'             => $phone,
    'source_campaign'   => $source_campaign,
    'source_channel'    => $source_channel,
    'source_name'       => $source_name,
    'source_url'        => $source_url,
    'staff_id'          => $staff_id,
    'status'            => $status,
    'tags'              => $tags,
]);

Deletes a Client by Id

$response = app("vcita")->deleteClient($client_id);

Retrieves a Client by Id

$response = app("vcita")->getClient($client_id);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固