evangeo/tickets
Composer 安装命令:
composer require evangeo/tickets
包简介
Ticket Support System
README 文档
README
Introduction
The Laravel Ticket Support Backend Package is a specialized solution for managing customer support requests and streamlining the back-end processes of your support system. This package is designed to empower your support team by providing the necessary tools for efficient ticket handling and resolution.
Installation
You can install the package via composer:
composer require evangeo/tickets
You can publish and run the migrations with:
php artisan vendor:publish --tag="tickets-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="tickets-config"
Tables
Ticket Table Structure
| Column Name | Type | Default |
|---|---|---|
| ID | integer |
NOT NULL |
| UUID | string |
NOT NULL |
| title | string |
NOT NULL |
| description | string |
NOT NULL |
| entity | string |
NOT NULL |
| entity_id | int |
NOT NULL |
| assigned_user | int |
NOT NULL |
| category_id | int |
NULL |
| internal_group_id | int |
NULL |
| status | enum (open, re-open, closed, archived) |
open |
| waiting_response_from | enum (user, entity) |
NOT NULL |
| priority | enum (low, normal, high) |
low |
| closed_by | enum (user, entity) |
NULL |
| created_at | timestamp |
current timestamp |
| created_by | int |
NULL |
| updated_at | timestamp |
current timestamp |
| modified_by | int |
NULL |
| deleted_at | timestamp |
NULL |
| deleted_by | int |
NULL |
Ticket Responses Table Structure
| Column Name | Type | Default |
|---|---|---|
| id | integer |
NOT NULL |
| ticket_id | int |
NOT NULL |
| message | mediumText |
NOT NULL |
| type | enum (external, internal) |
external |
| created_at | timestamp |
current timestamp |
| created_by | int |
NULL |
| updated_at | timestamp |
current timestamp |
| modified_by | int |
NULL |
| deleted_at | timestamp |
NULL |
| deleted_by | int |
NULL |
Ticket Attachment Table Structure
| Column Name | Type | Default |
|---|---|---|
| id | integer |
NOT NULL |
| response_id | int |
NOT NULL |
| name | string |
NOT NULL |
| mime | string |
NOT NULL |
| created_at | timestamp |
current timestamp |
| created_by | int |
NULL |
| updated_at | timestamp |
current timestamp |
| modified_by | int |
NULL |
| deleted_at | timestamp |
NULL |
| deleted_by | int |
NULL |
Ticket Category / Internal Group / Tags Table Structure
| Column Name | Type | Default |
|---|---|---|
| id | integer |
NOT NULL |
| name | string |
NOT NULL |
| entity | enum |
NOT NULL |
| enabled | boolean |
1 |
Ticket Tags Pivot Table Structure
| Column Name | Type | Default |
|---|---|---|
| id | int |
NOT NULL |
| ticket_id | int |
NOT NULL |
| tag_id | int |
NOT NULL |
Usage
- Create Ticket as User
$ticket = ticket()->createAsUser($userId, $ticketData)
- Create Ticket as Entity
$ticket = ticket()->createAsEntity($entityId, $ticketData)
- Interact With Ticket Status
$ticket->reOpen() ->open() ->archived()
- Interact With Ticket Category
$ticket->setCategory($id) ->removeCategory()
- Interact With Ticket Internal Group
$ticket->setInternalGroup($id) ->removeInternalGroup()
- Interact With Ticket Tags
$ticket->attachTags([$tagId1,$tagId2,$tagId3]) ->detachTags([$tagId1]) ->syncTags([$tagId4, $tagId5, $tagId6])
- Create Ticket Response
$reponse = $ticket->replyAsUser($userId, $responseData) $reponse = $ticket->replyAsEntity($entityId, $responseData)
- Interact with Response Message Type
$response->markAsInternalMessage() ->markAsExternalMessage()
- Upload Documents on Responses
$response->attachDocuments($attachments, function (AttachmentRepository $repository) use ($uploads){ $repository->upload($uploads, '/path/to/folder'); })
- Chainable Functions
$ticket = ticket() ->createAsUser($userId, $ticketData) ->setCategory($categoryId ->setInternalGroup($internalGroupId ->attachTags([$tagId1,$tagId2,$tagId3]) ->detachTags([$tagId1]) ->syncTags([$tagId4, $tagId5, $tagId6]) ->reOpen() ->open() ->archived() ->replyAsUser($userId, $responseData) ->markAsInternalMessage() ->attachDocuments($attachments, function (AttachmentRepository $repository) use ($uploads){ $repository->upload($uploads, '/path/to/folder'); }) ->getTicket();
- A real Scenario
$ticket = ticket() ->createAsUser($userId, $ticketData) ->replyAsUser($userId, $responseData) ->markAsInternalMessage() ->attachDocuments($attachments, function (AttachmentRepository $repository) use ($uploads){ $repository->upload($uploads, '/path/to/folder'); }) ->getTicket();
Testing
composer test
evangeo/tickets 适用场景与选型建议
evangeo/tickets 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 12 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「tickets」 「support-tickets」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 evangeo/tickets 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 evangeo/tickets 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 evangeo/tickets 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
iOS Passbook for Symfony
An embeddable support ticket system for Laravel applications
Laravel wrapper for PHP YouTrack SDK.
Support tickets for your laravel app
Support ticket system for Flarum. Users open tickets, staff handle them in a private threaded view. Banned users can submit ban appeals with rate limits.
Complete Service Desk package for Laravel with Tickets, SLA, Knowledge Base, and Service Catalog
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-03