PHPackages                             jeffersongoncalves/laravel-service-desk - 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. jeffersongoncalves/laravel-service-desk

ActiveLibrary[Admin Panels](/categories/admin)

jeffersongoncalves/laravel-service-desk
=======================================

Complete Service Desk package for Laravel with Tickets, SLA, Knowledge Base, and Service Catalog

v1.0.6(2mo ago)2311MITPHPPHP ^8.2

Since Feb 6Pushed 2mo agoCompare

[ Source](https://github.com/jeffersongoncalves/laravel-service-desk)[ Packagist](https://packagist.org/packages/jeffersongoncalves/laravel-service-desk)[ Docs](https://github.com/jeffersongoncalves/laravel-service-desk)[ GitHub Sponsors](https://github.com/jeffersongoncalves)[ RSS](/packages/jeffersongoncalves-laravel-service-desk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (11)Versions (8)Used By (1)

[![Laravel Service Desk](https://raw.githubusercontent.com/jeffersongoncalves/laravel-service-desk/main/art/jeffersongoncalves-laravel-service-desk.png)](https://raw.githubusercontent.com/jeffersongoncalves/laravel-service-desk/main/art/jeffersongoncalves-laravel-service-desk.png)

Laravel Service Desk
====================

[](#laravel-service-desk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9c71cf59aa49aa281a611ee11ac50b5ac79de1a33d2b505ee8295851c5f0a7ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d736572766963652d6465736b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-service-desk)[![GitHub Release](https://camo.githubusercontent.com/11fe06e271eb8cc3ca93d0423a23db0c466d541dce33e4dae4a189d4c4bb532e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d736572766963652d6465736b3f7374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/laravel-service-desk/releases/latest)[![GitHub Tests Action Status](https://camo.githubusercontent.com/6a097d36c1fbcd90d5c01006e086e25644261bde2de2f3be296df0a559d4a045/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d736572766963652d6465736b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/laravel-service-desk/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/53c0b8835229513430fcbc1f131b8f19c5c9cff34aa95280a93c7649a7a58c88/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d736572766963652d6465736b2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/laravel-service-desk/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/aa67a420eac7322513d401413cc60b712dd7fa5db91f55e02ed925a33b2a3197/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d736572766963652d6465736b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-service-desk)

A complete, headless Service Desk package for Laravel featuring ticket management, SLA tracking, knowledge base, service catalog with approval workflows, and multi-channel email integration.

Features
--------

[](#features)

- **Ticket Management** - Full lifecycle with status transitions, priorities, assignments, watchers, and auto-generated reference numbers
- **SLA Management** - Policies with business hours, breach detection, near-breach warnings, pause/resume, and escalation rules
- **Knowledge Base** - Articles with versioning, publishing workflow, full-text search, feedback collection, and SEO fields
- **Service Catalog** - Dynamic form builder, multi-step approval workflows, and automatic ticket creation
- **Email Integration** - Inbound email processing via IMAP, Mailgun, SendGrid, Resend, and Postmark
- **Event-Driven** - 24 domain events for extensibility
- **Notifications** - 10 built-in notification classes with queue support
- **Translations** - English and Brazilian Portuguese included
- **Headless** - No built-in UI; integrate with Filament, Livewire, Inertia, or any frontend

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

[](#requirements)

- PHP 8.2+
- Laravel 11.x or 12.x

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

[](#installation)

Install the package via Composer:

```
composer require jeffersongoncalves/laravel-service-desk
```

Publish the configuration and migrations:

```
php artisan vendor:publish --tag="service-desk-config"
php artisan vendor:publish --tag="service-desk-migrations"
```

Run the migrations:

```
php artisan migrate
```

Optionally publish the translation files:

```
php artisan vendor:publish --tag="service-desk-translations"
```

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

[](#configuration)

The configuration file `config/service-desk.php` allows you to customize:

### Models

[](#models)

```
'models' => [
    'user' => \App\Models\User::class,     // Who creates tickets
    'operator' => \App\Models\User::class,  // Who handles tickets
],
```

### Ticket Settings

[](#ticket-settings)

```
'ticket' => [
    'reference_prefix' => 'SD',            // Ticket references: SD-00001
    'default_status' => 'open',
    'default_priority' => 'medium',
    'allowed_extensions' => ['jpg', 'png', 'pdf', 'doc', 'xlsx', ...],
    'max_file_size' => 10240,              // KB
    'max_attachments_per_comment' => 5,
    'attachment_disk' => 'local',          // Any Laravel filesystem disk
    'auto_close_days' => null,             // null = disabled
    'allow_reopen' => true,
],
```

### SLA Settings

[](#sla-settings)

```
'sla' => [
    'enabled' => true,
    'auto_apply' => true,                  // Auto-apply policies on ticket creation
    'near_breach_minutes' => 30,
    'pause_on_statuses' => ['on_hold'],
    'default_business_hours_schedule' => null,
],
```

### Knowledge Base

[](#knowledge-base)

```
'knowledge_base' => [
    'enabled' => true,
    'versioning_enabled' => true,
    'feedback_enabled' => true,
    'track_views' => true,
    'search_engine' => 'database',         // Or custom implementation
],
```

### Service Catalog

[](#service-catalog)

```
'service_catalog' => [
    'enabled' => true,
    'auto_create_ticket' => true,          // Auto-create ticket from requests
    'approval_enabled' => true,
],
```

### Email Integration

[](#email-integration)

```
'email' => [
    'enabled' => true,
    'subject_prefix' => '[Service Desk #:reference]',
    'threading_enabled' => true,

    'inbound' => [
        'driver' => env('SERVICE_DESK_INBOUND_DRIVER'), // imap|mailgun|sendgrid|resend|postmark
        // Driver-specific settings...
    ],
],
```

### Notifications

[](#notifications)

```
'notifications' => [
    'channels' => ['mail'],
    'queue' => env('SERVICE_DESK_NOTIFICATION_QUEUE', 'default'),

    'notify_on' => [
        'ticket_created' => true,
        'ticket_assigned' => true,
        'ticket_status_changed' => true,
        'comment_added' => true,
        'sla_breached' => true,
        // ...
    ],
],
```

Setup
-----

[](#setup)

### Preparing Your User Model

[](#preparing-your-user-model)

Add the `HasTickets` and `IsOperator` traits to your User model:

```
use JeffersonGoncalves\ServiceDesk\Concerns\HasTickets;
use JeffersonGoncalves\ServiceDesk\Concerns\IsOperator;

class User extends Authenticatable
{
    use HasTickets, IsOperator;
}
```

Usage
-----

[](#usage)

### Using the Facade

[](#using-the-facade)

The `ServiceDesk` facade provides a clean API for all operations:

```
use JeffersonGoncalves\ServiceDesk\Facades\ServiceDesk;
```

### Ticket Management

[](#ticket-management)

```
// Create a ticket
$ticket = ServiceDesk::createTicket([
    'title' => 'Cannot login to the system',
    'body' => 'I get an error when trying to login...',
    'priority' => 'high',
    'department_id' => 1,
    'category_id' => 2,
], $user);

// Update a ticket
ServiceDesk::updateTicket($ticket, [
    'title' => 'Updated title',
    'priority' => 'urgent',
], $performer);

// Change status
use JeffersonGoncalves\ServiceDesk\Enums\TicketStatus;

ServiceDesk::changeStatus($ticket, TicketStatus::InProgress, $operator);

// Assign to operator
ServiceDesk::assignTicket($ticket, $operator, $assignedBy);

// Close / Reopen
ServiceDesk::closeTicket($ticket, $performer);
ServiceDesk::reopenTicket($ticket, $performer);

// Find tickets
$ticket = ServiceDesk::findTicketByUuid('550e8400-e29b-41d4-a716-446655440000');
$ticket = ServiceDesk::findTicketByReference('SD-00001');

// Watchers
ServiceDesk::addWatcher($ticket, $user);
ServiceDesk::removeWatcher($ticket, $user);
```

### Comments

[](#comments)

```
// Add a public reply
ServiceDesk::addComment($ticket, $author, 'Thanks for reporting this!', [
    'attachments' => $uploadedFiles,  // Optional
]);

// Add an internal note (not visible to the user)
ServiceDesk::addNote($ticket, $operator, 'Escalating to tier 2 support.');
```

### Departments

[](#departments)

```
// Create a department
$department = ServiceDesk::createDepartment([
    'name' => 'IT Support',
    'description' => 'Handles IT-related tickets',
    'is_active' => true,
]);

// Manage operators
ServiceDesk::addOperator($department, $operator, 'manager');
ServiceDesk::removeOperator($department, $operator);
```

### Accessing Services Directly

[](#accessing-services-directly)

For advanced operations, access the underlying services:

```
$ticketService = ServiceDesk::tickets();
$commentService = ServiceDesk::comments();
$departmentService = ServiceDesk::departments();
$attachmentService = ServiceDesk::attachments();
```

### Working with Enums

[](#working-with-enums)

All enums support translated labels via the `label()` method:

```
use JeffersonGoncalves\ServiceDesk\Enums\TicketStatus;
use JeffersonGoncalves\ServiceDesk\Enums\TicketPriority;
use JeffersonGoncalves\ServiceDesk\Enums\CommentType;

TicketStatus::Open->label();      // "Open" (en) / "Aberto" (pt_BR)
TicketPriority::High->label();    // "High" (en) / "Alta" (pt_BR)
CommentType::Reply->label();      // "Reply" (en) / "Resposta" (pt_BR)

// Status transitions
TicketStatus::Open->allowedTransitions();     // [Pending, InProgress, OnHold, ...]
TicketStatus::Open->canTransitionTo(TicketStatus::InProgress); // true
TicketStatus::Closed->canTransitionTo(TicketStatus::InProgress); // false

// Priority numeric value (useful for sorting)
TicketPriority::Low->numericValue();    // 1
TicketPriority::Urgent->numericValue(); // 4
```

### Available Enums

[](#available-enums)

EnumCases`TicketStatus`Open, Pending, InProgress, OnHold, Resolved, Closed`TicketPriority`Low, Medium, High, Urgent`TicketSource`Web, Email, Api, ServiceRequest, Phone, Chat`CommentType`Reply, Note, System`HistoryAction`Created, StatusChanged, PriorityChanged, Assigned, ...`ArticleStatus`Draft, Published, Archived`ArticleVisibility`Public, Internal`ServiceCategoryVisibility`Public, Internal, Draft`ServiceRequestStatus`Pending, Approved, Rejected, InProgress, Fulfilled, Cancelled`ApprovalStatus`Pending, Approved, Rejected`FormFieldType`Text, Textarea, Select, Checkbox, Radio, Date, ...`SlaBreachType`FirstResponse, NextResponse, Resolution`EscalationAction`Notify, Reassign, ChangePriority, Custom`DayOfWeek`Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, SaturdayEvents
------

[](#events)

The package dispatches domain events that you can listen to:

EventDispatched When`TicketCreated`A new ticket is created`TicketUpdated`A ticket is updated`TicketStatusChanged`Ticket status changes`TicketAssigned`Ticket is assigned to an operator`TicketPriorityChanged`Ticket priority changes`TicketClosed`A ticket is closed`TicketReopened`A closed ticket is reopened`TicketDeleted`A ticket is deleted`CommentAdded`A comment is added to a ticket`AttachmentAdded`An attachment is uploaded`AttachmentRemoved`An attachment is removed`SlaApplied`An SLA policy is applied to a ticket`SlaBreached`An SLA target is breached`SlaNearBreach`An SLA target is near breach`SlaMetricMet`An SLA target is met`EscalationTriggered`An escalation rule fires`ArticleCreated`A knowledge base article is created`ArticlePublished`An article is published`ArticleFeedbackReceived`Article feedback is submitted`ServiceRequestCreated`A service request is submitted`ServiceRequestStatusChanged`Service request status changes`ApprovalRequested`Approval is requested for a service request`ApprovalDecisionMade`An approval decision is made`InboundEmailReceived`An inbound email is received`InboundEmailProcessed`An inbound email is processed### Listening to Events

[](#listening-to-events)

```
// In your EventServiceProvider or listener
use JeffersonGoncalves\ServiceDesk\Events\TicketCreated;

class NotifySlackOnTicketCreation
{
    public function handle(TicketCreated $event): void
    {
        $ticket = $event->ticket;
        // Send Slack notification...
    }
}
```

Artisan Commands
----------------

[](#artisan-commands)

CommandDescription`service-desk:poll-imap-mailbox`Poll IMAP mailbox for new emails`service-desk:clean-inbound-emails`Delete old inbound emails past retention`service-desk:close-stale-tickets`Auto-close tickets without recent activity`service-desk:check-sla-breaches`Detect and mark SLA breaches`service-desk:process-escalations`Execute escalation rules for breached tickets`service-desk:recalculate-sla`Recalculate SLA due dates### Scheduling Commands

[](#scheduling-commands)

Add these to your `routes/console.php` or scheduler:

```
use Illuminate\Support\Facades\Schedule;

Schedule::command('service-desk:check-sla-breaches')->everyFiveMinutes();
Schedule::command('service-desk:process-escalations')->everyFiveMinutes();
Schedule::command('service-desk:poll-imap-mailbox')->everyFiveMinutes();
Schedule::command('service-desk:close-stale-tickets')->daily();
Schedule::command('service-desk:clean-inbound-emails')->daily();
```

Email Integration
-----------------

[](#email-integration-1)

### IMAP Polling

[](#imap-polling)

Requires the optional `webklex/php-imap` package:

```
composer require webklex/php-imap
```

Configure in `.env`:

```
SERVICE_DESK_INBOUND_DRIVER=imap
SERVICE_DESK_IMAP_HOST=imap.example.com
SERVICE_DESK_IMAP_PORT=993
SERVICE_DESK_IMAP_ENCRYPTION=ssl
SERVICE_DESK_IMAP_USERNAME=support@example.com
SERVICE_DESK_IMAP_PASSWORD=your-password
SERVICE_DESK_IMAP_FOLDER=INBOX
```

### Webhook Drivers (Mailgun, SendGrid, Resend, Postmark)

[](#webhook-drivers-mailgun-sendgrid-resend-postmark)

Configure the webhook driver and point your email provider's webhook URL to:

```
https://your-app.com/service-desk/webhooks/{driver}

```

Where `{driver}` is `mailgun`, `sendgrid`, `resend`, or `postmark`.

Each driver includes signature verification middleware for security.

Translations
------------

[](#translations)

The package ships with English and Brazilian Portuguese translations. To customize or add new languages, publish the translation files:

```
php artisan vendor:publish --tag="service-desk-translations"
```

Translation files will be published to `lang/vendor/service-desk/`.

Testing
-------

[](#testing)

```
composer test
```

### Static Analysis

[](#static-analysis)

```
composer analyse
```

### Code Formatting

[](#code-formatting)

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

- [Jefferson Goncalves](https://github.com/jeffersongoncalves)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance85

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Total

7

Last Release

77d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

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

---

Tags

approval-workflowcomposeremail-integrationhelpdeskjeffersongoncalvesknowledge-baselaravellaravel-packagephpservice-catalogservice-deskslaticketslaravelKnowledge Baseticketsservice-deskhelpdesksla

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jeffersongoncalves-laravel-service-desk/health.svg)

```
[![Health](https://phpackages.com/badges/jeffersongoncalves-laravel-service-desk/health.svg)](https://phpackages.com/packages/jeffersongoncalves-laravel-service-desk)
```

###  Alternatives

[studio/laravel-totem

A Laravel package to manage your cron jobs through a beautiful dashboard

1.8k1.1M](/packages/studio-laravel-totem)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[dyrynda/laravel-model-uuid

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

4802.8M8](/packages/dyrynda-laravel-model-uuid)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)

PHPackages © 2026

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