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

Commit 8c2b7af

Browse files
authored
Merge pull request #12 from martijn94/packageAutodiscovery
Package autodiscovery support
2 parents ede3cfa + c3d4a3b commit 8c2b7af

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

composer.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
"illuminate/support": "~5.4",
1616
"zendesk/zendesk_api_client_php": "2.*"
1717
},
18+
"extra": {
19+
"laravel": {
20+
"providers": [
21+
"Huddle\\Zendesk\\Providers\\ZendeskServiceProvider"
22+
],
23+
"aliases": {
24+
"Zendesk": "Huddle\\Zendesk\\Facades\\Zendesk"
25+
}
26+
}
27+
},
1828
"autoload": {
1929
"psr-4": {
2030
"Huddle\\Zendesk\\": "src"

readme.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ composer require huddledigital/zendesk-laravel
1616

1717
You must also install the service provider.
1818

19+
> Laravel 5.5+ users: this step may be skipped, as the package supports auto discovery.
20+
1921
```php
2022
// config/app.php
2123
'providers' => [
@@ -48,16 +50,16 @@ php artisan vendor:publish --provider="Huddle\Zendesk\Providers\ZendeskServicePr
4850
Set your configuration using **environment variables**, either in your `.env` file or on your server's control panel:
4951

5052
- `ZENDESK_SUBDOMAIN`
51-
53+
5254
The subdomain part of your Zendesk organisation URL.
5355

54-
e.g. http://huddledigital.zendesk.com use **huddledigital**
56+
e.g. http://huddledigital.zendesk.com use **huddledigital**
5557

56-
- `ZENDESK_USERNAME`
58+
- `ZENDESK_USERNAME`
5759

5860
The username for the authenticating account.
5961

60-
- `ZENDESK_TOKEN`
62+
- `ZENDESK_TOKEN`
6163

6264
The API access token. You can create one at: `https://SUBDOMAIN.zendesk.com/agent/admin/api/settings`
6365

@@ -99,11 +101,11 @@ If you'd prefer not to use the facade, you can skip adding the alias to `config/
99101
use Huddle\Zendesk\Services\ZendeskService;
100102

101103
class MyClass {
102-
104+
103105
public function __construct(ZendeskService $zendesk_service) {
104106
$this->zendesk_service = $zendesk_service;
105107
}
106-
108+
107109
public function addTicket() {
108110
$this->zendesk_service->tickets()->create([
109111
'subject' => 'Subject',
@@ -113,8 +115,8 @@ class MyClass {
113115
'priority' => 'normal'
114116
]);
115117
}
116-
118+
117119
}
118120
```
119-
121+
120122
This package is available under the [MIT license](http://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)