Skip to content
Laravel wrapper for zendesk/zendesk_api_client_php package.
Branch: master
Clone or download
Latest commit 8c2b7af Oct 4, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Adding service, service provider and facade Jun 2, 2015
src Allowing property calls to flow onto client Jun 28, 2017
composer.json Implement package auto discovery Oct 3, 2018 Add comment to docs to notice user of auto discovery Oct 3, 2018

Laravel Zendesk

This package provides integration with the Zendesk API. It supports creating tickets, retrieving and updating tickets, deleting tickets, etc.

The package simply provides a Zendesk facade that acts as a wrapper to the zendesk/zendesk_api_client_php package.

NB: Currently only supports token-based authentication.


You can install this package via Composer using:

composer require huddledigital/zendesk-laravel

You must also install the service provider.

Laravel 5.5+ users: this step may be skipped, as the package supports auto discovery.

// config/app.php
'providers' => [

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,


To publish the config file to app/config/zendesk-laravel.php run:

php artisan vendor:publish --provider="Huddle\Zendesk\Providers\ZendeskServiceProvider"

Set your configuration using environment variables, either in your .env file or on your server's control panel:


The subdomain part of your Zendesk organisation URL.

e.g. use huddledigital


The username for the authenticating account.


The API access token. You can create one at:



The Zendesk facade acts as a wrapper for an instance of the Zendesk\API\Client class. Any methods available on this class (documentation here) are available through the facade. for example:

// Get all tickets

// Create a new ticket
  'subject' => 'Subject',
  'comment' => [
      'body' => 'Ticket content.'
  'priority' => 'normal'

// Update multiple tickets
Zendesk::ticket([123, 456])->update([
  'status' => 'urgent'

// Delete a ticket

Dependency injection

If you'd prefer not to use the facade, you can skip adding the alias to config/app.php and instead inject Huddle\Zendesk\Services\ZendeskService into your class. You can then use all of the same methods on this object as you would on the facade.


use Huddle\Zendesk\Services\ZendeskService;

class MyClass {

    public function __construct(ZendeskService $zendesk_service) {
        $this->zendesk_service = $zendesk_service;

    public function addTicket() {
              'subject' => 'Subject',
              'comment' => [
                    'body' => 'Ticket content.'
              'priority' => 'normal'


This package is available under the MIT license.

You can’t perform that action at this time.