在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):huddledigital/zendesk-laravel开源软件地址(OpenSource Url):https://github.com/huddledigital/zendesk-laravel开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Laravel ZendeskThis package provides integration with the Zendesk API. It supports creating tickets, retrieving and updating tickets, deleting tickets, etc. The package simply provides a NB: Currently only supports token-based authentication. InstallationYou can install this package via Composer using: composer require huddledigital/zendesk-laravel You must also install the service provider.
// config/app.php
'providers' => [
...
Huddle\Zendesk\Providers\ZendeskServiceProvider::class,
...
]; If you want to make use of the facade you must install it as well. // config/app.php
'aliases' => [
..
'Zendesk' => Huddle\Zendesk\Facades\Zendesk::class,
]; ConfigurationTo publish the config file to php artisan vendor:publish --provider="Huddle\Zendesk\Providers\ZendeskServiceProvider" Set your configuration using environment variables, either in your
The subdomain part of your Zendesk organisation URL. e.g. http://huddledigital.zendesk.com use huddledigital
The username for the authenticating account.
The API access token. You can create one at:
Set this to UsageFacadeThe // Get all tickets
Zendesk::tickets()->findAll();
// Create a new ticket
Zendesk::tickets()->create([
'subject' => 'Subject',
'comment' => [
'body' => 'Ticket content.'
],
'priority' => 'normal'
]);
// Update multiple tickets
Zendesk::ticket([123, 456])->update([
'status' => 'urgent'
]);
// Delete a ticket
Zendesk::ticket(123)->delete(); Dependency injectionIf you'd prefer not to use the facade, you can skip adding the alias to <?php
use Huddle\Zendesk\Services\ZendeskService;
class MyClass {
public function __construct(ZendeskService $zendesk_service) {
$this->zendesk_service = $zendesk_service;
}
public function addTicket() {
$this->zendesk_service->tickets()->create([
'subject' => 'Subject',
'comment' => [
'body' => 'Ticket content.'
],
'priority' => 'normal'
]);
}
} This package is available under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论