定制 ghanem/gfycat 二次开发

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

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

ghanem/gfycat

Composer 安装命令:

composer require ghanem/gfycat

包简介

A Laravel package that provides a clean interface to the Tokeet Property Management API.

README 文档

README

Latest Stable Version License Total Downloads

A Laravel package that provides a clean interface to the Tokeet Property Management API. Manage rentals, inquiries, guests, channels, rates, events, invoices, and messages directly from your Laravel application.

Requirements

  • PHP 8.0+
  • Laravel 9.x, 10.x, 11.x, or 12.x

Installation

Install via Composer:

composer require ewa/tokeet

The package uses Laravel's auto-discovery, so the service provider and facade are registered automatically.

Publish Configuration

php artisan tokeet:install

Or manually:

php artisan vendor:publish --provider="Ewa\Tokeet\TokeetServiceProvider" --tag="config"

Environment Variables

Add the following to your .env file:

TOKEET_API_KEY=your-api-key
TOKEET_ACCOUNT_ID=your-account-id

You can find your API key in your Tokeet account under Settings > API.

Usage

Use the Tokeet facade to interact with the API:

use Ewa\Tokeet\Facades\Tokeet;

Rentals

// Get all rentals
$rentals = Tokeet::getRentals();

// Get a single rental
$rental = Tokeet::getRental('rental-id');

// Create a rental
$rental = Tokeet::createRental([
    'name' => 'Beach House',
    'address' => '123 Ocean Drive',
    'bedrooms' => 3,
    'bathrooms' => 2,
]);

// Update a rental
Tokeet::updateRental('rental-id', [
    'name' => 'Updated Beach House',
]);

// Delete a rental
Tokeet::deleteRental('rental-id');

Inquiries (Bookings)

// Get all inquiries
$inquiries = Tokeet::getInquiries();

// Get a single inquiry
$inquiry = Tokeet::getInquiry('inquiry-id');

// Create an inquiry
$inquiry = Tokeet::createInquiry([
    'guest_name' => 'John Doe',
    'check_in' => '2026-04-01',
    'check_out' => '2026-04-07',
    'rental_id' => 'rental-id',
]);

// Update an inquiry
Tokeet::updateInquiry('inquiry-id', [
    'status' => 'confirmed',
]);

// Delete an inquiry
Tokeet::deleteInquiry('inquiry-id');

Guests

// Get all guests
$guests = Tokeet::getGuests();

// Get a single guest
$guest = Tokeet::getGuest('guest-id');

// Create a guest
$guest = Tokeet::createGuest([
    'name' => 'Jane Doe',
    'email' => 'jane@example.com',
    'phone' => '+1234567890',
]);

// Update a guest
Tokeet::updateGuest('guest-id', [
    'phone' => '+0987654321',
]);

Channels

// Get all channels
$channels = Tokeet::getChannels();

Rates

// Get rates for a rental
$rates = Tokeet::getRates('rental-id');

// Create a rate
Tokeet::createRate([
    'rental_id' => 'rental-id',
    'name' => 'Summer Rate',
    'amount' => 150,
    'start_date' => '2026-06-01',
    'end_date' => '2026-08-31',
]);

// Delete a rate
Tokeet::deleteRate('rate-id');

Events (Calendar)

// Get all events
$events = Tokeet::getEvents();

// Create an event
Tokeet::createEvent([
    'rental_id' => 'rental-id',
    'title' => 'Maintenance',
    'start_date' => '2026-04-15',
    'end_date' => '2026-04-16',
]);

// Delete an event
Tokeet::deleteEvent('event-id');

Invoices

// Get all invoices
$invoices = Tokeet::getInvoices();

// Get a single invoice
$invoice = Tokeet::getInvoice('invoice-id');

// Create an invoice
Tokeet::createInvoice([
    'inquiry_id' => 'inquiry-id',
    'amount' => 1050,
]);

Messages

// Get all messages
$messages = Tokeet::getMessages();

// Send a message
Tokeet::sendMessage([
    'inquiry_id' => 'inquiry-id',
    'body' => 'Welcome to our property!',
]);

Error Handling

Failed API requests return an array with the status code and error details:

$result = Tokeet::getRentals();

if (is_array($result) && isset($result['status_code'])) {
    // Handle error
    echo "Error {$result['status_code']}: " . json_encode($result['error']);
}

Testing

composer test

License

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

ghanem/gfycat 适用场景与选型建议

ghanem/gfycat 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 194 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 07 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 ghanem/gfycat 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-26