2017 © Pedro Peláez
 

laravel-package freshdesk-laravel

Laravel package for the Freshdesk API (v2)

image

mpclarkson/freshdesk-laravel

Laravel package for the Freshdesk API (v2)

  • Friday, August 11, 2017
  • by hilenium
  • Repository
  • 3 Watchers
  • 9 Stars
  • 6,545 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 2 Open issues
  • 5 Versions
  • 28 % Grown

The README.md

Freshdesk Service Provider for Laravel 5

Build Status Scrutinizer Code Quality SensioLabsInsight Packagist, (*1)

This is a service provider for interacting with the Freshdesk API v2 via the freshdesk-php-sdk in Laravel and Lumen applications., (*2)

Installation

To add this bundle to your app, use Composer., (*3)

Add mpclarkson/freshdesk-laravel to your composer.json file:, (*4)

{
    "require": {
        "mpclarkson/freshdesk-laravel": "dev-master"
    }
}

Then run:, (*5)

sh composer update, (*6)

You must then register the provider in your application., (*7)

Register the provider in the providers key in your config/app.php:, (*8)

    'providers' => array(
        // ...
        Mpclarkson\Laravel\Freshdesk\FreshdeskServiceProvider::class,
    )

Then add the Freshdesk facade alias in the aliases key in your config/app.php:, (*9)

    'aliases' => array(
        // ...
        'Freshdesk' => Mpclarkson\Laravel\Freshdesk\FreshdeskFacade::class,
    )

Configuration

To customize the configuration file, publish the package configuration using Artisan., (*10)

php artisan vendor:publish

Update the settings in the app/config/freshdesk.php file., (*11)

return [
    'api_key' => 'your_freshdesk_api_key',
    'domain' => 'your_freshdesk_domain',
];

Accessing the Freshdesk API

In a controller you can access Freshdesk resource as follows:, (*12)


//Contacts $contacts = Freshdesk::contacts()->update($contactId, $data); //Agents $me = Freshdesk::agents()->current(); //Companies $company = Freshdesk::companies()->create($data); //Groups $deleted = Freshdesk::groups()->delete($groupId); //Tickets $ticket = Freshdesk::tickets()->view($filters); //Time Entries $time = Freshdesk::timeEntries()->all($ticket['id']); //Conversations $ticket = Freshdesk::conversations()->note($ticketId, $data); //Categories $newCategory = Freshdesk::categories()->create($data); //Forums $forum = Freshdesk::forums()->create($categoryId, $data); //Topics $topics =Freshdesk::topics()->monitor($topicId, $userId); //Comments $comment = Freshdesk::comments()->create($forumId); //Email Configs $configs = Freshdesk::emailConfigs()->all(); //Products $product = Freshdesk::products()->view($productId); //Business Hours $hours = Freshdesk::businessHours()->all(); //SLA Policy $policies = Freshdesk::slaPolicies()->all();

Filtering

All GET requests accept an optional array $query parameter to filter results. For example:, (*13)

//Page 2 with 50 results per page
$page2 = Freshdesk::forums()->all(['page' => 2, 'per_page' => 50]);

//Tickets for a specific customer
$tickets = Freshdesk::tickets()->view(['company_id' => $companyId]);

Please read the Freshdesk documentation for further information on filtering GET requests., (*14)

Contributing

This is a work in progress and PRs are welcome. Please read the contributing guide., (*15)

Author

The library was written and maintained by Matthew Clarkson from Hilenium., (*16)

References

The Versions

11/08 2017

dev-master

9999999-dev https://github.com/mpclarkson/freshdesk-laravel

Laravel package for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api support help desk freshdesk customer service

19/10 2016

0.3.0

0.3.0.0 https://github.com/mpclarkson/freshdesk-laravel

Laravel package for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api support help desk freshdesk customer service

22/04 2016

0.2.2

0.2.2.0 https://github.com/mpclarkson/freshdesk-laravel

Laravel package for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api support help desk freshdesk customer service

22/04 2016

0.2.1

0.2.1.0 https://github.com/mpclarkson/freshdesk-laravel

Laravel package for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api support help desk freshdesk customer service