PHPackages                             saasplayground/support-tickets - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. saasplayground/support-tickets

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

saasplayground/support-tickets
==============================

Support tickets for your laravel app

0.0.4(2y ago)2667GPL-2.0-or-laterPHPPHP ^7.4|^8.0

Since Feb 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/saasplayground/support-tickets)[ Packagist](https://packagist.org/packages/saasplayground/support-tickets)[ Docs](https://github.com/saasplayground/support-tickets)[ RSS](/packages/saasplayground-support-tickets/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (11)Versions (5)Used By (0)

API first Support Tickets for Laravel App
=========================================

[](#api-first-support-tickets-for-laravel-app)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c7ca0add34610a654196f12a744f8ddc2a75414657a93e8e457be3036bde46fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616173706c617967726f756e642f737570706f72742d7469636b6574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/saasplayground/support-tickets)[![Total Downloads](https://camo.githubusercontent.com/9d2a59cadc6c2643e70d02f24d5d6e1b155f407b943c74514bfeda4317d3d366/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616173706c617967726f756e642f737570706f72742d7469636b6574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/saasplayground/support-tickets)[![GitHub Actions](https://github.com/saasplayground/support-tickets/actions/workflows/main.yml/badge.svg)](https://github.com/saasplayground/support-tickets/actions/workflows/main.yml/badge.svg)

Support Tickets package with API first approach. It provides a simple and easy API to add support tickets to your Laravel app. Supports Laravel 8 and above.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require saasplayground/support-tickets
```

Then publish `config` file:

```
php artisan vendor:publish --tag=support-tickets-config

```

Finally run the migrate command:

```
php artisan migrate

```

Usage
-----

[](#usage)

### User Setup and API

[](#user-setup-and-api)

To enable users to open tickets, add `InteractsWithTickets` trait to your `User` model.

```
use InteractsWithTickets;
```

#### InteractsWithTickets Methods

[](#interactswithtickets-methods)

- `openTicket`: Open a new support ticket.
- `postMessageOnTicket`: Post a new message on an existing ticket.
- `tickets`: Gets tickets owned by user. Query builder methods can be chained on it.

**openTicket Method**: `Ticket`

> Returns an instance of `Ticket` model.

Expects the following parameters:

- `data`: An array containing title, message, priority, source
- `relations`: (Optional) An array of relationships; Support for adding `labels`, `categories`

**postMessageOnTicket Method**: `Ticket`

> Returns an instance of `Ticket` model.

Expects following parameters:

- `ticket`: The ticket model
- `message`: The message to be posted
- `user`: (Optional) The `id` or `model` of user that will be attached to message

### Tickets Setup and API

[](#tickets-setup-and-api)

By default the `Ticket` model does not need any setup, but if you are extending it, be sure to update the corresponding value under `models` in config file.

#### Ticket Model Methods

[](#ticket-model-methods)

- `syncCategories`: Handles adding and deleting of entity categories.
- `addCategories`: Add categories to the entity.
- `detachCategories`: Removes given categories from entity.
- `categories`: The categories that belong to the model. Query builder methods can be chained on it.
- `syncLabels`: Handles adding and deleting of entity labels.
- `addLabels`: Add labels to the entity.
- `detachLabels`: Removes given labels from entity.
- `labels`: The labels that belong to the model. Query builder methods can be chained on it.
- `addMessage`: Add message to the entity.
- `detachMessages`: Removes a set of messages or all messages from entity.
- `messages`: The messages that belong to the model. Query builder methods can be chained on it.
- `postMessageAsAgent`: Posts a message as agent.
- `assignAgent`: Assigns an agent to the ticket.

**syncCategories**: `void`

Expects the following parameters:

- `categories`: An array of ids, int, or collection (model instances)

**addCategories**: `void`

Expects the following parameters:

- `categories`: An array of ids, int, or collection (model instances)

**detachCategories**: `void`

Expects the following parameters:

- `categories`: An array of ids, int, or collection (model instances)

**categories**: `Collection`

> Returns a collection of or query builder instance of `Category` model.

**syncLabels**: `void`

Expects the following parameters:

- `labels`: An array of ids, int, or collection (model instances)

**addLabels**: `void`

Expects the following parameters:

- `labels`: An array of ids, int, or collection (model instances)

**detachLabels**: `void`

Expects the following parameters:

- `labels`: An array of ids, int, or collection (model instances)

**labels**: `Collection`

> Returns a collection of or query builder instance of `Label` model.

**addMessage**: `false` or `Message`

> Returns false if user cannot be resolved or message cannot be created, else an instance of Message Model

Expects the following parameters:

- `body`: A `string` containing the message
- `user`: (Optional) A user `id`, `Model` or `null` (when null default value is the ticket's user id)

**detachMessages**: `void`

Expects the following parameters:

- `messages`: (Optional) An array of ids, model id, or collection (model instances);

***Deletes all messages when no value passed.***

**messages**: `Collection`

> Returns a collection of or query builder instance of `Message` model.

**postMessageAsAgent**: `false` or `Message`

> Returns false if user cannot be resolved or message cannot be created, else an instance of Message Model

Expects the following parameters:

- `message`: A `string` containing the message body

**assignAgent**: `false` or `Ticket`

> Returns false if user cannot be resolved, else an instance of `Ticket` model to chain more operations.

Expects the following parameters:

- `value`: `int` or `User` model instance.

#### Configuration

[](#configuration)

See the published `support-tickets` config file for available options.

**Note**: When modifying the config file, ensure the `users`, `tables` and `models` values are always set.

> Most of the default setup is set to match the basic Laravel app structure, hence there is no need to modify the config file heavily.

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Cuthbert Mirambo](https://github.com/miracuthbert)
- [All Contributors](../../contributors)

License
-------

[](#license)

The GNU GPLv3. Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~93 days

Total

4

Last Release

941d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13046285?v=4)[Cuthbert Mirambo](/maintainers/miracuthbert)[@miracuthbert](https://github.com/miracuthbert)

---

Top Contributors

[![miracuthbert](https://avatars.githubusercontent.com/u/13046285?v=4)](https://github.com/miracuthbert "miracuthbert (4 commits)")

---

Tags

support-ticketssaasplayground

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/saasplayground-support-tickets/health.svg)

```
[![Health](https://phpackages.com/badges/saasplayground-support-tickets/health.svg)](https://phpackages.com/packages/saasplayground-support-tickets)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M130](/packages/laravel-pulse)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M130](/packages/roots-acorn)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k90.5k1](/packages/mike-bronner-laravel-model-caching)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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