ghanem/gfycat
Composer 安装命令:
composer require ghanem/gfycat
包简介
A Laravel package that provides a clean interface to the Tokeet Property Management API.
README 文档
README
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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ghanem/gfycat 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Alfabank REST API integration
Zero-dependency raw PHP DNS resolver, domain-ownership verification, and intoDNS/MxToolbox-style diagnostics. Queries authoritative nameservers directly over sockets — never trusts the recursive cache for ownership checks.
Laravel package for Accurate Online API integration.
A lightweight plain-PHP framework for database-backed CRUD APIs.
bughq error tracking - PHP SDK
统计信息
- 总下载量: 194
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-26