Download the PHP package codebar-ag/laravel-zendesk without Composer
On this page you can find all versions of the php package codebar-ag/laravel-zendesk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codebar-ag/laravel-zendesk
More information about codebar-ag/laravel-zendesk
Files in codebar-ag/laravel-zendesk
Package laravel-zendesk
Short Description Zendesk integration with Laravel
License MIT
Homepage https://github.com/codebar-ag/laravel-zendesk
Informations about the package laravel-zendesk
This package was developed to give you a quick start to creating tickets via the Zendesk API.
π‘ What is Zendesk?
Zendesk is a cloud-based help desk management solution offering customizable tools to build customer service portals, knowledge base and online communities.
π Requirements
| Package | PHP | Laravel | Zendesk |
|---|---|---|---|
| v13.0 | ^8.3 - ^8.5 | 13.x | β |
| v12.0 | ^8.2 - ^8.4 | 12.x | β |
| v11.0 | ^8.2 - ^8.3 | 11.x | β |
| v1.0 | ^8.2 | 10.x | β |
Authentication
The currently supported authentication methods are:
| Method | Supported |
|---|---|
| Basic Auth | β |
| API token | β |
| OAuth access token | β |
βοΈ Installation
You can install the package via composer:
Optionally, you can publish the config file with:
You can add the following env variables to your .env file:
Note: We handle base64 encoding for you so you don't have to encode your credentials.
You can retrieve your API token from your Zendesk Dashboard
Usage
To use the package, you need to create a ZendeskConnector instance.
Requests
The following requests are currently supported:
| Request | PHP class | Supported |
|---|---|---|
| List tickets | AllTicketsRequest |
β |
| Count tickets | CountTicketsRequest |
β |
| Get ticket | SingleTicketRequest |
β |
| Create ticket | CreateSingleTicketRequest |
β |
| Create attachment | CreateAttachmentRequest |
β |
Responses
The following responses are currently supported for retrieving the response body:
| Response Methods | Description | Supported |
|---|---|---|
| body | Returns the HTTP body as a string | β |
| json | Retrieves a JSON response body and json_decodes it into an array. | β |
| object | Retrieves a JSON response body and json_decodes it into an object. | β |
| collect | Retrieves a JSON response body and json_decodes it into a Laravel collection. Requires illuminate/collections to be installed. | β |
| dto | Converts the response into a DTO. This package provides DTOs for the requests above; Saloon also allows custom DTOs. | β |
See https://docs.saloon.dev/the-basics/responses for more information.
Enums
We provide enums for the following values:
| Enum | Values |
|---|---|
| TicketPriority | 'urgent', 'high', 'normal', 'low' |
| TicketType | 'incident', 'problem', 'question', 'task' |
| MalwareScanResult | 'malware_found', 'malware_not_found', 'failed_to_scan', 'not_scanned' |
Note: When using the dto method on a response, the enum values will be converted to their respective enum class.
Zendesk API and DTO coverage
Official ticket JSON is documented in the Zendesk Tickets API. SingleTicketDTO maps a large subset of fields returned by Zendesk; it is not guaranteed to include every property the API may return. For example, the docs show custom_status_id and generated_timestamp on ticket objects; those keys are not mapped on SingleTicketDTO today.
DTOs
We provide DTOs for the following:
| DTO | PHP class |
|---|---|
| AttachmentDTO | CodebarAg\Zendesk\Dto\Tickets\Attachments\AttachmentDTO |
| ThumbnailDTO | CodebarAg\Zendesk\Dto\Tickets\Attachments\ThumbnailDTO |
| UploadDTO | CodebarAg\Zendesk\Dto\Tickets\Attachments\UploadDTO |
| CommentDTO | CodebarAg\Zendesk\Dto\Tickets\Comments\CommentDTO |
| AllTicketsDTO | CodebarAg\Zendesk\Dto\Tickets\AllTicketsDTO |
| CountTicketsDTO | CodebarAg\Zendesk\Dto\Tickets\CountTicketsDTO |
| SingleTicketDTO | CodebarAg\Zendesk\Dto\Tickets\SingleTicketDTO |
Note: This is the preferred way to work with requests and responses. You can still use the json, object, and collect methods, and pass arrays into requests where supported.
Examples
Create a ticket
List all tickets
Count all tickets
Get a ticket
Upload an attachment
π§ Testing
Copy your own phpunit.xml-file.
Run the tests:
π Changelog
Please see CHANGELOG for recent changes.
βοΈ Contributing
Please see CONTRIBUTING for details.
Code Style
π§βπ» Security Vulnerabilities
Please review our security policy on reporting security vulnerabilities.
π Credits
- Sebastian BΓΌrgin-Fix
- All Contributors
- Skeleton Repository from Spatie
- Laravel Package Training from Spatie
- Laravel Saloon by Sam CarrΓ©
π License
The MIT License (MIT). Please have a look at License File for more information.
All versions of laravel-zendesk with dependencies
guzzlehttp/guzzle Version ^7.8
illuminate/contracts Version ^13.0
saloonphp/cache-plugin Version ^3.1
saloonphp/laravel-plugin Version ^4.0
saloonphp/saloon Version ^4.0
spatie/laravel-data Version ^4.0
spatie/laravel-package-tools Version ^1.19