Package Data | |
---|---|
Maintainer Username: | aspitzer |
Maintainer Contact: | webmaster@bluemove.es (Bluemove) |
Package Create Date: | 2016-04-05 |
Package Last Update: | 2016-04-06 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:02:05 |
Package Statistics | |
---|---|
Total Downloads: | 3,493 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 7 |
Total Forks: | 2 |
Total Open Issues: | 0 |
A Laravel Zendesk library for integrating with the Zendesk API
This package provides a Laravel service provider and facade for the zendesk/zendesk_api_client_php package.
composer require bluemove/laravel-zendesk
Register the service provider in app.php
'providers' => array(
'Bluemove\Zendesk\ZendeskServiceProvider',
)
Register the facade in app.php
'aliases' => array(
'Zendesk' => 'Bluemove\Zendesk\ZendeskFacade',
)
Create a services.php config file.
<?php
return array(
'zendesk' => array(
'subdomain' => '[[your zendesk subdomain]]',
'username' => '[[your zendesk username]]',
'token' => '[[your zendesk api token]]',
),
);
Please see https://github.com/zendesk/zendesk_api_client_php for full documentation on the core API.
All functions provided by the core API are available behind the Zendesk
facade in Laravel.
use Zendesk;
// get all tickets
$zendesk = Zendesk::tickets()->findAll();
// create a new ticket
$ticket = Zendesk::tickets()->create([
'subject' => 'The quick brown fox jumps over the lazy dog',
'comment' => [
'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
],
'priority' => 'normal'
]);
$newUser = Zendesk::users()->create([
'name' => 'Roger Rabit',
'alias' => 'Roger Rabit',
'email' => 'roger@cartoons.com',
'external_id' => '123456'
]);