cavitznky/ticket-system
Composer 安装命令:
composer require cavitznky/ticket-system
包简介
A comprehensive ticket system for Laravel applications with multi-language support
README 文档
README
A comprehensive ticket system for Laravel applications.
Installation
You can install the package via composer:
composer require cavitznky/ticket-system
Publishing Assets
You can publish the config, migrations, views, and translations using the following commands:
# Publish migrations php artisan vendor:publish --tag="ticket-system-migrations" # Publish config php artisan vendor:publish --tag="ticket-system-config" # Publish views php artisan vendor:publish --tag="ticket-system-views" # Publish translations php artisan vendor:publish --tag="ticket-system-translations" # Publish Livewire component php artisan vendor:publish --tag="ticket-system-components" # Publish models php artisan vendor:publish --tag="ticket-system-models" # Publish traits php artisan vendor:publish --tag="ticket-system-traits" # Publish all components (Livewire, Models, Traits) php artisan vendor:publish --tag="ticket-system-all-components" # Or publish everything php artisan vendor:publish --provider="Digitalcake\TicketSystem\TicketSystemServiceProvider"
Customization
Customizing the components
You can publish and modify all the components to adapt them to your needs:
- Publish the components you want to customize:
# For example, to customize the Livewire component php artisan vendor:publish --tag="ticket-system-components"
-
After publishing, the components will be available in your application:
- Livewire component:
app/Livewire/TicketSystem.php - Models:
app/Models/TicketSystem/ - Traits:
app/Traits/TicketSystem/
- Livewire component:
-
Modify them according to your needs. When you publish a component, you take full control of it and it will no longer be updated when you update the package.
Using published components
If you've published the Livewire component, make sure to update your view to use your application's namespace:
<livewire:ticket-system /> <!-- Uses the package component --> <!-- After publishing the Livewire component: --> <livewire:ticket-system /> <!-- Now uses your customized component in App\Livewire -->
Note: Laravel will automatically use the component from your application instead of the one from the package.
Usage
To make your User model compatible with the ticket system, use the HasTickets trait:
use Digitalcake\TicketSystem\Traits\HasTickets; class User extends Authenticatable { use HasTickets; // ... }
To define admin users who can manage all tickets, add the getTicketAdmin method to your User model:
public function getTicketAdmin(): bool { // Define your logic to determine if a user is an admin return $this->isAdmin(); // or any other logic }
Adding the Livewire Component
Add the ticket system component to your view:
<livewire:ticket-system />
Features
- Create, view, edit and delete tickets
- Respond to tickets
- Change ticket status (open, in progress, resolved, closed)
- Set ticket priority (low, medium, high, urgent)
- Filter tickets by status and priority
- Search tickets by title and description
- Multi-language support (EN, FR, NL, TR)
Languages
The package supports the following languages:
- English (en)
- French (fr)
- Dutch (nl)
- Turkish (tr)
Configuration
You can customize the ticket system by publishing the config file:
return [ // Number of tickets per page 'per_page' => 10, // Other configuration options... ];
Events
This package provides the following events that you can listen to in your application:
TicketCreated
Fired when a new ticket is created.
use Digitalcake\TicketSystem\Events\TicketCreated; // In your EventServiceProvider protected $listen = [ TicketCreated::class => [ // Your listeners here ], ]; // In your listener public function handle(TicketCreated $event) { $ticket = $event->ticket; // Do something with the ticket }
TicketUpdated
Fired when a ticket is updated.
use Digitalcake\TicketSystem\Events\TicketUpdated; // In your EventServiceProvider protected $listen = [ TicketUpdated::class => [ // Your listeners here ], ]; // In your listener public function handle(TicketUpdated $event) { $ticket = $event->ticket; $originalData = $event->originalData; // Do something with the ticket and original data }
TicketStatusChanged
Fired when a ticket's status is changed.
use Digitalcake\TicketSystem\Events\TicketStatusChanged; // In your EventServiceProvider protected $listen = [ TicketStatusChanged::class => [ // Your listeners here ], ]; // In your listener public function handle(TicketStatusChanged $event) { $ticket = $event->ticket; $oldStatus = $event->oldStatus; $newStatus = $event->newStatus; // Do something with the ticket and status information }
TicketResponseAdded
Fired when a response is added to a ticket.
use Digitalcake\TicketSystem\Events\TicketResponseAdded; // In your EventServiceProvider protected $listen = [ TicketResponseAdded::class => [ // Your listeners here ], ]; // In your listener public function handle(TicketResponseAdded $event) { $ticket = $event->ticket; $response = $event->response; // Do something with the ticket and response }
TicketDeleted
Fired when a ticket is deleted.
use Digitalcake\TicketSystem\Events\TicketDeleted; // In your EventServiceProvider protected $listen = [ TicketDeleted::class => [ // Your listeners here ], ]; // In your listener public function handle(TicketDeleted $event) { $ticketId = $event->ticketId; $ticketData = $event->ticketData; // Do something with the ticket ID and data }
License
The MIT License (MIT). Please see License File for more information.
cavitznky/ticket-system 适用场景与选型建议
cavitznky/ticket-system 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 03 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「support」 「laravel」 「helpdesk」 「livewire」 「ticket-system」 「cavitznky」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cavitznky/ticket-system 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cavitznky/ticket-system 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cavitznky/ticket-system 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
With Magento 2 FAQ Extension, you will not need to worry about creating useful and nice FAQ page for your ecommerce website. The extension will help you to set up nice informative & SEO-friendly magento 2 FAQ page. With faq page, your customers will find convenient, easily and quick to resolve commo
Ticketit, the simple helpdesk tickets system pre-installed in Laravel
HelpDesk Extension for magento2
a simple toolkit for social networks
Laravel wrapper for PHP YouTrack SDK.
ARCANEDEV Support Helpers
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-23