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. aichadigital/laratickets

ActiveLibrary

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

Laravel package for support tickets

v0.1.1(2mo ago)050↓100%[3 PRs](https://github.com/AichaDigital/laratickets/pulls)AGPL-3.0-or-laterPHPPHP ^8.3CI passing

Since Nov 24Pushed 2mo 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 today

READMEChangelogDependencies (14)Versions (6)Used By (0)

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

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

> **⚠️ ALPHA VERSION - IN ACTIVE DEVELOPMENT**
>
> This package is currently in alpha stage and under active development. The API and features may change significantly before the first stable release. **Not recommended for production use yet.**
>
> - Current Status: Pre-release (v0.x)
> - Expected Stable Release: TBD
> - Contributions and feedback welcome!

[![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 support ticket management system for Laravel with 4-level escalation, risk assessment, evaluations, and full RESTful API.

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
- **RESTful API**: Full versioned API (v1) with Laravel Sanctum authentication
- **Flexible Authorization**: Contract-based authorization system, easily adaptable to any permission package
- **Multi-ID Support**: Works with integer, UUID (v4/v7), UUID binary, and ULID primary keys
- **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 (8 tables)
- Seed default levels (I-IV) and departments

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

[](#configuration)

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

```
return [
    // User model configuration
    'user' => [
        'model' => env('LARATICKETS_USER_MODEL', config('auth.providers.users.model')),
        'id_type' => env('LARATICKETS_USER_ID_TYPE', 'auto'), // auto|int|uuid|ulid
    ],

    // 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

38

—

LowBetter than 85% of packages

Maintenance85

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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 ~18 days

Total

2

Last Release

88d ago

### 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 (24 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

[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4832.7M8](/packages/dyrynda-laravel-model-uuid)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13662.4k1](/packages/ralphjsmit-laravel-helpers)[basillangevin/laravel-data-json-schemas

Transforms Spatie Data objects into JSON Schemas with built-in validation

136.9k1](/packages/basillangevin-laravel-data-json-schemas)

PHPackages © 2026

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