All Projects → mpclarkson → Freshdesk Laravel

mpclarkson / Freshdesk Laravel

Licence: mit
Freshdesk Service Provider for Laravel 5 and Lumen

Projects that are alternatives of or similar to Freshdesk Laravel

Lumen Generators
A collection of generators for Lumen and Laravel 5.
Stars: ✭ 339 (+2321.43%)
Mutual labels:  laravel, lumen
Laravel Migrations Generator
Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.
Stars: ✭ 417 (+2878.57%)
Mutual labels:  laravel, lumen
Laravel Swoole
High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
Stars: ✭ 3,726 (+26514.29%)
Mutual labels:  laravel, lumen
Laravel5 Jsonapi
Laravel 5 JSON API Transformer Package
Stars: ✭ 313 (+2135.71%)
Mutual labels:  laravel, lumen
Laravel Responder
A Laravel Fractal package for building API responses, giving you the power of Fractal with Laravel's elegancy.
Stars: ✭ 673 (+4707.14%)
Mutual labels:  laravel, lumen
Laravel S
LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.
Stars: ✭ 3,479 (+24750%)
Mutual labels:  laravel, lumen
Lumen Api Demo
Lumen rest api demo with Dingo/Api, JWT, CORS, PHPUNIT
Stars: ✭ 856 (+6014.29%)
Mutual labels:  laravel, lumen
Laravel Log Viewer
🐪 Laravel log viewer
Stars: ✭ 2,726 (+19371.43%)
Mutual labels:  laravel, lumen
Lumen Generator
A Lumen Generator You Are Missing
Stars: ✭ 578 (+4028.57%)
Mutual labels:  laravel, lumen
Laravel Soap
A soap client wrapper for Laravel
Stars: ✭ 559 (+3892.86%)
Mutual labels:  laravel, lumen
Laravel Swap
💵 Currency exchange rates for Laravel and Lumen
Stars: ✭ 296 (+2014.29%)
Mutual labels:  laravel, lumen
Bugsnag Laravel
Bugsnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
Stars: ✭ 746 (+5228.57%)
Mutual labels:  laravel, lumen
Laravel Job Status
Add ability to track Job progress, status and result dispatched to Queue.
Stars: ✭ 279 (+1892.86%)
Mutual labels:  laravel, lumen
Jwt Auth Guard
JWT Auth Guard for Laravel and Lumen Frameworks.
Stars: ✭ 319 (+2178.57%)
Mutual labels:  laravel, lumen
Laravel Postal Code Validation
Worldwide postal code validation for Laravel and Lumen
Stars: ✭ 278 (+1885.71%)
Mutual labels:  laravel, lumen
Elasticsearch
The missing elasticsearch ORM for Laravel, Lumen and Native php applications
Stars: ✭ 375 (+2578.57%)
Mutual labels:  laravel, lumen
Seotools
SEO Tools for Laravel
Stars: ✭ 2,406 (+17085.71%)
Mutual labels:  laravel, lumen
Jikan Rest
The REST API for Jikan
Stars: ✭ 200 (+1328.57%)
Mutual labels:  laravel, lumen
Rest Api With Lumen
Rest API boilerplate for Lumen micro-framework.
Stars: ✭ 464 (+3214.29%)
Mutual labels:  laravel, lumen
Laravel Elasticsearch
An easy way to use the official Elastic Search client in your Laravel applications.
Stars: ✭ 717 (+5021.43%)
Mutual labels:  laravel, lumen

Freshdesk Service Provider for Laravel 5

Build Status Scrutinizer Code Quality SensioLabsInsight Packagist

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

Installation

To add this bundle to your app, use Composer.

Add mpclarkson/freshdesk-laravel to your composer.json file:

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

Then run:

composer update

You must then register the provider in your application.

Register the provider in the providers key in your config/app.php:

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

Then add the Freshdesk facade alias in the aliases key in your config/app.php:

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

Configuration

To customize the configuration file, publish the package configuration using Artisan.

php artisan vendor:publish

Update the settings in the app/config/freshdesk.php file.

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:

//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:

//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.

Contributing

This is a work in progress and PRs are welcome. Please read the contributing guide.

Author

The library was written and maintained by Matthew Clarkson from Hilenium.

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].