evangeo / tickets
Ticket Support System
dev-master
2023-12-05 13:30 UTC
Requires
- php: ^8.1
- ext-json: *
- illuminate/contracts: ^8.0|^9.0|^10
- illuminate/support: ^8.0|^9.0|^10
- laravel/tinker: ^2.7
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-09-05 00:54:34 UTC
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
Ticket Responses Table Structure
Ticket Attachment Table Structure
Ticket Category / Internal Group / Tags Table Structure
Ticket Tags Pivot Table Structure
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