PHPackages                             badchoice/handesk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. badchoice/handesk-php

ActiveLibrary[API Development](/categories/api)

badchoice/handesk-php
=====================

Handesk PHP sdk

1.1.1(4y ago)1327.7k14[4 issues](https://github.com/BadChoice/handesk-php/issues)[1 PRs](https://github.com/BadChoice/handesk-php/pulls)MITPHP

Since Aug 14Pushed 3y ago3 watchersCompare

[ Source](https://github.com/BadChoice/handesk-php)[ Packagist](https://packagist.org/packages/badchoice/handesk-php)[ RSS](/packages/badchoice-handesk-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (5)Dependencies (5)Versions (12)Used By (0)

```
### A Handesk PHP sdk

Check the full project at [https://github.com/BadChoice/handesk](https://github.com/BadChoice/handesk)

### Installation

```
composer require badchoice/handesk-php
```

#### Usage
#### Initializaion
To initialize the Handesk-php sdk you simply need to call to

```
Handesk::setup('your-handesk-url', 'your-handesk-api-token');
```

If you use laravel you can use the `config/services.php` file and do it like this

```php
// In AppServiceProvider boot method
Handesk::setup(config('services.handesk.url'), config('services.handesk.token'));
```

```php
    //In config.services.php file
    'handesk' => [
        'url'   => env('HANDESK_URL', 'http://handesk.dev/api'),
        'token' => env('HANDESK_TOKEN', 'the-api-token')
    ],
```

##### Tickets
To get the open tickets for a requester (it only returns the ticket header, see find below to get the full ticket)

```php
$tickets = (new Ticket)->get('requesterNameOrEmail');
```

You can ask for the closed, or solved adding a second parameter

```php
$solvedTickets = (new Ticket)->get('requesterNameOrEmail','solved');
$openTickets = (new Ticket)->get('requesterNameOrEmail','solved');
```

You can create new tickets as well

```php
$ticket_id = (new Ticket)->create(
    ["name" => "Requester name", "email" => "requester@email.com"],
    "The ticket subject",
    "The ticket initial body",
    ["tag1","tag2"]
   );
```

And then fetch a ticket

```php
$ticket = (new Ticket)->find($id);
$comments = $ticket->comments; //Includes the initial comment
$comments->first()->requester; // ["name" => "Requester name", "email" => "Requester email"]
```

Adding comments to tickets
```php
$ticket->addComment("Adding a comment");
$ticket->addComment("Adding a comment and solving the ticket", true);
```

##### Teams
```php
    $team = Team::create("team name", "team email";
    (new Team(2))->tickets();           //gets all open tickets for team with id 2
    (new Team(2))->tickets('solved');   //gets all solved tickets for team with id 2
    (new Team(2))->ticketsCount();      //gets the count of all open tickets for team with id 2
    (new Team(2))->ticketsCount('closed'); //gets the count of all closed tickets for team with id 2

    (new Team(2))->leads();      //gets the open leads for a team (paginated)
    (new Team(2))->leadsCount(); //gets the count of all live leads for team with id 2
```

##### Leads

To create a lead simply call:
```php
$id = (new Lead)->create([
            "email"       => "bruce@wayne.com",
            "body"        => "I'm interested in buying this awesome app",
            "username"    => "brucewayne",
            "name"        => "Bruce Wayne",
            "phone"       => "0044 456 567 54",
            "address"     => "Wayne manner",
            "city"        => "Gotham",
            "postal_code" => "90872",
            "company"     => "Wayne enterprises"]
            ,
            ["lightning","handesk"]
        );
```
> Only `name` is a required field

#### Development
PRs welcome
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 82.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~159 days

Recently: every ~75 days

Total

10

Last Release

1804d ago

Major Versions

0.1.4 → 1.02020-09-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/93900?v=4)[Jordi Puigdellívol](/maintainers/BadChoice)[@BadChoice](https://github.com/BadChoice)

---

Top Contributors

[![BadChoice](https://avatars.githubusercontent.com/u/93900?v=4)](https://github.com/BadChoice "BadChoice (14 commits)")[![lucidlemon](https://avatars.githubusercontent.com/u/2458762?v=4)](https://github.com/lucidlemon "lucidlemon (2 commits)")[![s5w95](https://avatars.githubusercontent.com/u/4512259?v=4)](https://github.com/s5w95 "s5w95 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/badchoice-handesk-php/health.svg)

```
[![Health](https://phpackages.com/badges/badchoice-handesk-php/health.svg)](https://phpackages.com/packages/badchoice-handesk-php)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M923](/packages/statamic-cms)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k406.5k25](/packages/team-reflex-discord-php)[grazulex/laravel-apiroute

Complete API versioning lifecycle management for Laravel

10813.6k](/packages/grazulex-laravel-apiroute)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
