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(5y 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 4w ago

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

### A Handesk PHP sdk

[](#a-handesk-php-sdk)

Check the full project at

### Installation

[](#installation)

```
composer require badchoice/handesk-php

```

#### Usage

[](#usage)

#### Initializaion

[](#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

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

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

##### Tickets

[](#tickets)

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

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

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

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

You can create new tickets as well

```
$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

```
$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

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

##### Teams

[](#teams)

```
    $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

[](#leads)

To create a lead simply call:

```
$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

[](#development)

PRs welcome

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity33

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

1849d 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

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M158](/packages/laravel-cashier)[statamic/cms

The Statamic CMS Core Package

4.9k3.8M1.1k](/packages/statamic-cms)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.3M74](/packages/spatie-laravel-responsecache)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

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

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

1.1k434.3k26](/packages/team-reflex-discord-php)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

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

PHPackages © 2026

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