macklus / yii2-freshdesk
Simple Yii2 module to extend Freshdesk API
Installs: 1 534
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- mpclarkson/freshdesk-php-sdk: dev-master
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2024-11-13 05:16:23 UTC
README
Simple Yii2 module to extend Freshdesk API
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist macklus/yii2-freshdesk "*"
or add
"macklus/yii2-freshdesk": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply declare a component in your config file:
'freshdesk' => [ 'class' => 'macklus\freshdesk\Freshdesk', 'api_key' => 'ThisIsAFakeApiKey', 'domain' => 'macklus', ],
After that, you can call Freshdesk API by using:
$response = Yii::$app->freshdesk->tickets->create([
'name' => 'Customer name',
'email' => 'Customer Email',
'cc_emails' => ['Customer Email'],
'subject' => "Your ticket",
'description' => 'The content of ticket',
'status' => 2,
'priority' => 1,
]);