avaro/placetel-php-client 问题修复 & 功能扩展

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

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

avaro/placetel-php-client

最新稳定版本:0.1.0-beta.1

Composer 安装命令:

composer require avaro/placetel-php-client

包简介

A PHP client library for the Placetel REST API

README 文档

README

Packagist Version License: MIT PHP Version

Placetel PHP Client is a modern, easy-to-use PHP package for integrating the Placetel REST API into your own applications or CRM systems. With this client, you can easily retrieve, create, update, and delete contacts, all through a clean, object-oriented API.

Features

  • Fully CRUD-capable Contact Repository (create, getById, update, delete)
  • Modern PHP 8+ design with namespaces and DTOs
  • Composer-ready and immediately usable in your own projects

Installation

Install via Composer:

composer require avaro-crm/placetel-php-client

Quick Start

require 'vendor/autoload.php';

use Avaro\Placetel\Client;
use Avaro\Placetel\Entity\Contact;

$client = new Client(getenv('PLACETEL_API_TOKEN'));

// Retrieve all contacts
$contacts = $client->contacts()->all();
foreach ($contacts as $contact) {
    echo $contact->getFirstName() . ' ' . $contact->getLastName() . PHP_EOL;
}

// Create a new contact
$newContact = new Contact(
    firstName: "Anna",
    lastName: "Schmidt",
    email: "anna.schmidt@example.com",
    company: "Avaro GmbH"
);

$created = $client->contacts()->create($newContact);
echo "Contact created with ID: " . $created->getId();

// Update a contact
$created->setEmail("anna.maria@example.com");
$updated = $client->contacts()->update($created);

// Delete a contact
$client->contacts()->delete($updated->getId());

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-03