PHPackages                             aichadigital/laratickets - 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. [Admin Panels](/categories/admin)
4. /
5. aichadigital/laratickets

ActiveLibrary[Admin Panels](/categories/admin)

aichadigital/laratickets
========================

Laravel package for support tickets

v1.1.0(1mo ago)0493[1 issues](https://github.com/AichaDigital/laratickets/issues)AGPL-3.0-or-laterPHPPHP ^8.3CI passing

Since Dec 7Pushed 1mo agoCompare

[ Source](https://github.com/AichaDigital/laratickets)[ Packagist](https://packagist.org/packages/aichadigital/laratickets)[ Docs](https://github.com/aichadigital/laratickets)[ GitHub Sponsors]()[ RSS](/packages/aichadigital-laratickets/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (84)Versions (21)Used By (0)

Laratickets - Advanced Support Ticket System for Laravel
========================================================

[](#laratickets---advanced-support-ticket-system-for-laravel)

[![Latest Version](https://camo.githubusercontent.com/2a5d1a7b62e76a9789d710244164719f747a6469c5134b8bd0396a001029058e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61696368616469676974616c2f6c6172617469636b6574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aichadigital/laratickets)[![Total Downloads](https://camo.githubusercontent.com/b16fc288edb398637b55ad3684f9e4d8d20d8319858b2a934a7d4690412fc0e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61696368616469676974616c2f6c6172617469636b6574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aichadigital/laratickets)[![Pipeline](https://camo.githubusercontent.com/43bec47eafa88708ef53fc33958015d2cca7f19d42a34ff621d43bdcbf0fcda9/68747470733a2f2f6769746c61622e636173747269732e636f6d2f61696368616469676974616c2f6c6172617469636b6574732f6261646765732f6d61696e2f706970656c696e652e7376673f7374796c653d666c61742d737175617265)](https://gitlab.castris.com/aichadigital/laratickets/-/pipelines)[![Coverage](https://camo.githubusercontent.com/de02cfa0bd34f9a71c3f5f0fdd308d14aee3df335d22e4215dfa879474f3a0c0/68747470733a2f2f6769746c61622e636173747269732e636f6d2f61696368616469676974616c2f6c6172617469636b6574732f6261646765732f6d61696e2f636f7665726167652e7376673f7374796c653d666c61742d737175617265)](https://gitlab.castris.com/aichadigital/laratickets/-/pipelines)[![PHPStan level 6](https://camo.githubusercontent.com/4d6f780caf0316a9bb11367ed840c90cc62c491e59d7b9ff4ccd854950016679/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230362d677265656e2e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://phpstan.org/)[![PHP Version](https://camo.githubusercontent.com/c7d84227635a7c53664a1c9f6042c56c5132a0e723a550592253562c024c9632/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f61696368616469676974616c2f6c6172617469636b6574732e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/aichadigital/laratickets)[![Laravel Version](https://camo.githubusercontent.com/18f881b50e044a91960c1023095094599e65c156497c42fffd139e2e14059fc7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e7825323025374325323031332e782d7265642e7376673f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://laravel.com)[![License](https://camo.githubusercontent.com/53ae7c0116284075565e8762aec2546554313c2074df75b683868597b7ccff8c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61696368616469676974616c2f6c6172617469636b6574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aichadigital/laratickets)

> Development happens on [gitlab.castris.com](https://gitlab.castris.com/aichadigital/laratickets). The GitHub repository is a read-only distribution mirror: issues and pull requests opened there are not seen.

> **v1.0 — stable contract.** The public contract is frozen as of v1.0.0 (see [`docs/ADR-004-v1.0-contract.md`](docs/ADR-004-v1.0-contract.md)).
>
> - **Core (stable):** open · assign · reassign · converse · close · departments
>     - routing · priority · attachments · statuses.
> - **Optional-stable (ON by default):** level escalation.
> - **Optional-experimental (`@experimental`, OFF by default):** evaluations, agent rating, risk assessment — outside the semver promise.

[![Latest Version on Packagist](https://camo.githubusercontent.com/2a5d1a7b62e76a9789d710244164719f747a6469c5134b8bd0396a001029058e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61696368616469676974616c2f6c6172617469636b6574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aichadigital/laratickets)[![License: AGPL v3](https://camo.githubusercontent.com/a326e68ef329f3f80ff10962d50c5d6b8629a65cd901c11288dfe737ebd907b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4147504c25323076332d626c75652e7376673f7374796c653d666c61742d737175617265)](https://www.gnu.org/licenses/agpl-3.0)[![Tests](https://camo.githubusercontent.com/12ceab8df00a02ded31023c01f5ced51c4fb2c6be529438ce83ba8113fe4431c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f41696368614469676974616c2f6c6172617469636b6574732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/AichaDigital/laratickets/actions/workflows/run-tests.yml)[![PHPStan](https://camo.githubusercontent.com/3a93aeb47cb3d9b473d267c57dae45cc9b6035fc29b0558644a7b12ce2d5de5d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f41696368614469676974616c2f6c6172617469636b6574732f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/AichaDigital/laratickets/actions/workflows/phpstan.yml)[![Code Style](https://camo.githubusercontent.com/3a2ff236162d945126f4b8680b895ecbe3d4b36659190f9d0c7fede5d759ab01/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f41696368614469676974616c2f6c6172617469636b6574732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/AichaDigital/laratickets/actions/workflows/fix-php-code-style-issues.yml)[![Code Coverage](https://camo.githubusercontent.com/066546e4c0cd953dea957314fc9efca6f2a26f479ab1965e1f6b18bbe831b77c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f41696368614469676974616c2f6c6172617469636b6574733f7374796c653d666c61742d737175617265)](https://codecov.io/gh/AichaDigital/laratickets)[![Total Downloads](https://camo.githubusercontent.com/b16fc288edb398637b55ad3684f9e4d8d20d8319858b2a934a7d4690412fc0e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61696368616469676974616c2f6c6172617469636b6574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aichadigital/laratickets)

A comprehensive, UUID-first support ticket management system for Laravel with 4-level escalation, risk assessment, evaluations, and full RESTful API. General-purpose for any UUID-first Laravel application.

Features
--------

[](#features)

- **4-Level Escalation System**: Automatic and manual escalation between support levels (I, II, III, IV)
- **Department Management**: Organize tickets by departments (Technical, Administrative, Commercial)
- **Risk Assessment**: Level III/IV agents can assess ticket risk with automatic critical escalation
- **Ticket Evaluations**: Global ticket scoring and individual agent ratings
- **File Attachments**: Upload/download/delete files attached to tickets. Configurable disk (local/S3/…), mime/size restrictions, role-based authorization via contract. See [ADR-002](docs/ADR-002-ticket-attachments.md).
- **RESTful API**: Full versioned API (v1) with Laravel Sanctum authentication
- **Flexible Authorization**: Contract-based authorization system, easily adaptable to any permission package
- **UUID-first**: Requires `users.id` UUID v7 char(36). See [setup-uuid.md](https://github.com/AichaDigital/larabill/blob/main/docs/setup-uuid.md) (shared with larabill) for consumer setup. See [ADR-001](docs/ADR-001-uuid-first.md) for rationale.
- **Event System**: 11 events for complete extensibility
- **SLA Management**: Configurable SLA hours per level with auto-escalation on breach
- **Comprehensive Testing**: 25+ tests with 80+ assertions

Requirements
------------

[](#requirements)

- PHP 8.4+
- Laravel 12.x

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

[](#installation)

Install via Composer:

```
composer require aichadigital/laratickets
```

Run the installation command:

```
php artisan laratickets:install --seed
```

This will:

- Publish configuration file
- Run migrations (10 tables)
- Seed default levels (I-IV) and departments

> **Migrations are package-managed.** Laratickets owns its database schema and loads it from the package via `loadMigrationsFrom()`. The install command does **not** copy migrations into your application, and applications should not publish or edit the package migrations. User foreign keys require UUID-compatible (`char(36)` UUID v7) user IDs. If you need custom schema ownership, fork or request an extension point. See [ADR-005](docs/ADR-005-package-managed-migrations.md).

Configuration
-------------

[](#configuration)

The configuration file is published to `config/laratickets.php`:

```
return [
    // User model configuration (UUID-first; users.id MUST be char(36) UUID v7)
    'user' => [
        'model' => env('LARATICKETS_USER_MODEL', config('auth.providers.users.model')),
        'id_column' => env('LARATICKETS_USER_ID_COLUMN', 'id'),
    ],

    // Authorization handlers
    'authorization' => [
        'handler' => \AichaDigital\Laratickets\Implementations\BasicTicketAuthorization::class,
        'capability_handler' => \AichaDigital\Laratickets\Implementations\BasicUserCapabilityHandler::class,
    ],

    // Features
    'evaluation' => ['enabled' => true],
    'risk_assessment' => ['enabled' => true, 'auto_escalate_on_critical' => true],
    'sla' => ['enabled' => true, 'auto_escalation_on_breach' => true],
    // ... more configuration options
];
```

Basic Usage
-----------

[](#basic-usage)

### Creating a Ticket

[](#creating-a-ticket)

```
use AichaDigital\Laratickets\Services\TicketService;
use AichaDigital\Laratickets\Enums\Priority;

$ticketService = app(TicketService::class);

$ticket = $ticketService->createTicket([
    'subject' => 'Database connection issue',
    'description' => 'Cannot connect to production database',
    'priority' => Priority::HIGH,
    'department_id' => 1,
], $user);
```

### Requesting Escalation

[](#requesting-escalation)

```
use AichaDigital\Laratickets\Services\EscalationService;

$escalationService = app(EscalationService::class);

$escalation = $escalationService->requestEscalation(
    $ticket,
    $targetLevel, // TicketLevel model
    'Issue requires senior expertise',
    $requester
);
```

### Assessing Risk

[](#assessing-risk)

```
use AichaDigital\Laratickets\Services\RiskAssessmentService;
use AichaDigital\Laratickets\Enums\RiskLevel;

$riskService = app(RiskAssessmentService::class);

$assessment = $riskService->assessRisk(
    $ticket,
    $assessor, // Must be Level III or IV
    RiskLevel::CRITICAL,
    'Affects production systems for 10k+ users'
);
// Auto-escalates if risk is CRITICAL
```

### Evaluating a Ticket

[](#evaluating-a-ticket)

```
use AichaDigital\Laratickets\Services\EvaluationService;

$evaluationService = app(EvaluationService::class);

$evaluation = $evaluationService->evaluateTicket(
    $ticket,
    $evaluator,
    4.5, // Score 1.0-5.0
    'Excellent support, quick resolution'
);
```

API Usage
---------

[](#api-usage)

All API endpoints require Laravel Sanctum authentication.

**Base URL:** `/api/v1/laratickets`

### Examples

[](#examples)

**Create Ticket:**

```
curl -X POST /api/v1/laratickets/tickets \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Login issue",
    "description": "Cannot log in to dashboard",
    "priority": "high",
    "department_id": 1
  }'
```

**List Tickets:**

```
curl /api/v1/laratickets/tickets?status=open&level=1 \
  -H "Authorization: Bearer {token}"
```

**Request Escalation:**

```
curl -X POST /api/v1/laratickets/tickets/1/escalations \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "target_level_id": 2,
    "justification": "Requires advanced database knowledge"
  }'
```

See [API Documentation](docs/API.md) for complete endpoint reference.

Authorization
-------------

[](#authorization)

Laratickets uses a contract-based authorization system. The default implementation provides basic authorization, but you can easily integrate with any permission package (Bouncer, Spatie Permission, etc.).

### Custom Authorization Handler

[](#custom-authorization-handler)

```
namespace App\Laratickets\Authorization;

use AichaDigital\Laratickets\Contracts\TicketAuthorizationContract;
use Silber\Bouncer\BouncerFacade as Bouncer;

class MyTicketAuthorization implements TicketAuthorizationContract
{
    public function canViewTicket($user, Ticket $ticket): bool
    {
        return Bouncer::can('view-tickets')
            || $user->id === $ticket->created_by;
    }

    // Implement other methods...
}
```

Update config:

```
'authorization' => [
    'handler' => \App\Laratickets\Authorization\MyTicketAuthorization::class,
],
```

Events
------

[](#events)

Laratickets dispatches 11 events that you can listen to:

- `TicketCreated`
- `TicketAssigned`
- `TicketStatusChanged`
- `TicketClosed`
- `EscalationRequested`
- `EscalationApproved`
- `EscalationRejected`
- `TicketEvaluated`
- `AgentRated`
- `RiskAssessed`
- `SLABreached`

### Example Listener

[](#example-listener)

```
use AichaDigital\Laratickets\Events\TicketCreated;

class SendTicketCreatedNotification
{
    public function handle(TicketCreated $event): void
    {
        $ticket = $event->ticket;

        // Send notification to level I agents
        Notification::send(
            $this->getLevelIAgents($ticket->department_id),
            new NewTicketNotification($ticket)
        );
    }
}
```

Testing
-------

[](#testing)

```
composer test
```

Code Style
----------

[](#code-style)

```
composer format
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Abdelkarim Mateos Sanchez](https://github.com/aichadigital)
- [All Contributors](../../contributors)

License
-------

[](#license)

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-or-later). See [LICENSE.md](LICENSE.md) for details.

### Contributor License Agreement

[](#contributor-license-agreement)

Contributors must agree to our [Contributor License Agreement (CLA)](CLA.md) before their contributions can be accepted. This helps ensure the project remains free and open source.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance93

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.1% 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 ~23 days

Recently: every ~12 days

Total

10

Last Release

32d ago

Major Versions

v0.7.0 → v1.0.02026-06-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a4694c48c325d3dfbc4c43d97c2617f9317d7a447971750c338f943a88bd164?d=identicon)[abkrim](/maintainers/abkrim)

---

Top Contributors

[![abkrim](https://avatars.githubusercontent.com/u/1238625?v=4)](https://github.com/abkrim "abkrim (41 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

laravelAicha Digitallaratickets

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/aichadigital-laratickets/health.svg)

```
[![Health](https://phpackages.com/badges/aichadigital-laratickets/health.svg)](https://phpackages.com/packages/aichadigital-laratickets)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k99.8M349](/packages/laravel-horizon)[filament/support

Core helper methods and foundation code for all Filament packages.

2333.9M295](/packages/filament-support)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

25060.1k](/packages/vormkracht10-laravel-mails)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

2324.4k1](/packages/mradder-filament-logger)

PHPackages © 2026

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