LaravelPackages.net
Acme Inc.
Toggle sidebar
roundly-consulting/tickets-for-laravel

Headless helpdesk ticketing core: categories, swappable statuses, replies and internal notes, assignment, priorities, due dates, custom fields, guest requesters and optional projects.

6
2
1.0.2
About roundly-consulting/tickets-for-laravel

roundly-consulting/tickets-for-laravel is a Laravel package for headless helpdesk ticketing core: categories, swappable statuses, replies and internal notes, assignment, priorities, due dates, custom fields, guest requesters and optional projects.. It currently has 2 GitHub stars and 6 downloads on Packagist (latest version 1.0.2). Install it with composer require roundly-consulting/tickets-for-laravel. Discover more Laravel packages by roundly-consulting or browse all Laravel packages to compare alternatives.

Last updated

Tickets for Laravel — Roundly open source

Latest release Tests Code style Donate Patreon Crypto

Tickets for Laravel

A headless helpdesk core for Laravel apps: categories, swappable statuses, public replies and internal notes, assignment, priorities, due dates, custom fields, guest requesters and optional projects — behind one facade, with an opt-in JSON API and mail notifications in English and Slovak.

Installation

Requires PHP 8.4, Laravel 12 or 13, and a MySQL or PostgreSQL database.

composer require roundly-consulting/tickets-for-laravel
php artisan tickets:install
php artisan migrate

tickets:install publishes the config and the migrations of tickets and the packages it builds on, and prints the key types to settle first: with UUID or ULID user keys, set them before migrating. Overdue flags and auto-close run on the scheduler:

// routes/console.php
use Illuminate\Support\Facades\Schedule;

Schedule::command('tickets:sweep')->everyFiveMinutes();  // overdue and due-soon flags
Schedule::command('lifecycle:sweep')->everyMinute();     // closes resolved tickets after 7 days

Agents take tickets, so your user model implements the assignee contract: class User extends Authenticatable implements Assignee { use IsTicketAssignee; } (RoundlyConsulting\Tickets\Contracts\Assignee, RoundlyConsulting\Tickets\Concerns\IsTicketAssignee).

Usage

File, work and resolve a ticket through the facade ($customer and $agent are your users):

use Illuminate\Support\Facades\Gate;
use RoundlyConsulting\Tickets\Facades\Tickets;

// Who is an agent is your call: is_support stands for your own agent flag. An undefined ability denies.
Gate::define('tickets.agent', fn ($user) => $user->is_support);

// A category, once: its defaults apply to every ticket filed under it.
$hardware = Tickets::categories()->make(['en' => 'Hardware', 'sk' => 'Hardvér'])
    ->defaults(priority: 'high', dueIn: 'P1D')
    ->create();

// The customer opens a ticket — numbered TCK-1, high priority, due in a day.
$ticket = Tickets::make()
    ->subject('Printer on floor 3 is jammed')
    ->description('Paper jam error E-102 since this morning.')
    ->requester($customer)
    ->category($hardware)
    ->create();

// An agent takes it, answers the customer and leaves a note only agents see.
Tickets::for($ticket)->by($agent)->claim()->start();
Tickets::for($ticket)->by($agent)->reply('A technician is on the way.', transition: 'wait');
Tickets::for($ticket)->by($agent)->note('Roller worn out, order a spare.');

// The customer's reply puts it back in the queue; the agent resolves it.
Tickets::for($ticket)->by($customer)->reply('Works again, thanks!');
Tickets::for('TCK-1')->by($agent)->resolve('Roller replaced.');

Tickets::for('TCK-1')->status();   // TicketStatus::Resolved
Tickets::for('TCK-1')->thread();   // the two public replies — never the note

Documentation

The full documentation — configuration, every feature and its API, and testing — lives on our website: roundly-consulting.com/open-source/docs/tickets-for-laravel

Release notes are in CHANGELOG.md. To contribute, see the contributing guide.

Support our work

This package is free and open source, built and maintained by Roundly Consulting. If it saves you time, please consider supporting our open-source work — a one-time donation, a monthly pledge on Patreon or a crypto donation helps fund maintenance, new features and new packages.

Donate to Roundly open source Become a patron on Patreon Donate crypto: BTC, ETH, BNB or SOL

License

The MIT License (MIT). See LICENSE.md.

Comments