Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Updated readme to better describe package.
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-huddle committed Jun 2, 2015
1 parent 4ecbdec commit 09d7d29
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Laravel Zendesk

This package provides a ```Zendesk``` facade that acts as a wrapper to the [zendesk/zendesk_api_client_php](https://github.com/zendesk/zendesk_api_client_php) package.
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](https://github.com/zendesk/zendesk_api_client_php) package.

**NB:** Currently only supports token-based authentication.

## Installation

Install via composer by adding the following to your composer.json:

```
```json
...
"require": {
"huddledigital/zendesk-laravel": "~1.0"
Expand All @@ -18,15 +20,15 @@ Install via composer by adding the following to your composer.json:

Add service provider to ```config/app.php```:

```
```php
...
'Huddle\Zendesk\Providers\ZendeskServiceProvider',
...
```

Add alias to ```config/app.php```:

```
```php
...
'Zendesk' => 'Huddle\Zendesk\Facades\Zendesk',
...
Expand All @@ -46,7 +48,7 @@ Set your configuration using **environment variables**, either in your ```.env``

The ```Zendesk``` facade acts as a wrapper for an instance of the ```Zendesk\API\Client``` class. Any methods available on this class ([documentation here](https://github.com/zendesk/zendesk_api_client_php#usage)) are available through the facade. for example:

```
```php
// Get all tickets
Zendesk::tickets()->findAll();

Expand All @@ -72,7 +74,7 @@ Zendesk::ticket(123)->delete();

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.

```
```php
<?php

use Huddle\Zendesk\Services\ZendeskService;
Expand All @@ -95,4 +97,4 @@ class MyClass {

}
```

0 comments on commit 09d7d29

Please sign in to comment.