PHPackages                             fereydooni/laravel-ticketable - 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. fereydooni/laravel-ticketable

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

fereydooni/laravel-ticketable
=============================

A robust ticketing system for Laravel applications using PHP attributes

00PHPCI failing

Since Apr 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Behnamfe76/laravel-ticketable)[ Packagist](https://packagist.org/packages/fereydooni/laravel-ticketable)[ RSS](/packages/fereydooni-laravel-ticketable/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

RobustTicketing
===============

[](#robustticketing)

A feature-rich ticketing system for Laravel applications using PHP attributes.

Features
--------

[](#features)

- Create and manage tickets with customizable categories, priorities, and statuses
- Assign tickets to users
- Add comments with Markdown support
- Attach files to tickets and comments
- Track ticket status changes
- Send notifications for ticket events
- Filter and search tickets

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

[](#requirements)

- PHP 8.1+
- Laravel 10.x

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

[](#installation)

### 1. Install the package via Composer

[](#1-install-the-package-via-composer)

```
composer require fereydooni/laravel-ticketable
```

### 2. Publish the configuration file

[](#2-publish-the-configuration-file)

```
php artisan vendor:publish --provider="Fereydooni\LaravelTicketable\TicketingServiceProvider" --tag="config"
```

### 3. Run the migrations

[](#3-run-the-migrations)

```
php artisan migrate
```

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

[](#configuration)

After publishing the configuration file, you can modify the settings in `config/ticketing.php`:

```
return [
    'features' => [
        'attachments' => true,
        'notifications' => true,
        'markdown_support' => true,
        'soft_deletes' => true,
    ],
    'defaults' => [
        'status' => 'open',
        'priority' => 'medium',
        'category' => 'general',
    ],
    // ... more configuration options
];
```

Usage
-----

[](#usage)

### Using PHP Attributes

[](#using-php-attributes)

The package provides two main attributes:

#### 1. `Ticketable` Attribute (for classes)

[](#1-ticketable-attribute-for-classes)

```
use Fereydooni\LaravelTicketable\Attributes\Ticketable;

#[Ticketable(category: 'bug', priority: 'high', assignable: true)]
class YourModel extends Model
{
    // Your model implementation
}
```

#### 2. `TicketAction` Attribute (for methods)

[](#2-ticketaction-attribute-for-methods)

```
use Fereydooni\LaravelTicketable\Attributes\TicketAction;

class YourClass
{
    #[TicketAction(action: 'comment', notify: true)]
    public function addComment($user, $content)
    {
        // Method implementation
    }
}
```

### Using the TicketManager

[](#using-the-ticketmanager)

The package provides a `TicketManager` class to handle ticket operations:

```
use Fereydooni\LaravelTicketable\Services\TicketManager;

// Inject via dependency injection
public function __construct(TicketManager $ticketManager)
{
    $this->ticketManager = $ticketManager;
}

// Or resolve from the container
$ticketManager = app(TicketManager::class);

// Create a ticket
$ticket = $ticketManager->create([
    'title' => 'App Crash',
    'description' => 'App crashes on login.',
    'category' => 'bug',
    'priority' => 'high',
    'creator_id' => auth()->id(),
]);

// Assign a ticket
$ticketManager->assign($ticket, User::find(2));

// Add a comment
$ticketManager->addComment($ticket, auth()->user(), 'Please provide logs.');

// Attach a file
$ticketManager->attachFile($ticket, $request->file('log'), auth()->user());

// Update status
$ticketManager->updateStatus($ticket, 'in_progress');

// Find tickets with filters
$tickets = $ticketManager->findTickets([
    'category' => 'bug',
    'priority' => 'high',
    'status' => 'open',
    'assigned_to' => 2,
    'search' => 'crash',
]);
```

### Using the Facade

[](#using-the-facade)

The package also provides a `Ticket` facade for easier access:

```
use Fereydooni\LaravelTicketable\Facades\Ticket;

// Create a ticket
$ticket = Ticket::create([
    'title' => 'App Crash',
    'description' => 'App crashes on login.',
    'category' => 'bug',
    'priority' => 'high',
]);

// Assign a ticket
Ticket::assign($ticket, User::find(2));

// Add a comment
Ticket::addComment($ticket, auth()->user(), 'Please provide logs.');

// Attach a file
Ticket::attachFile($ticket, $request->file('log'), auth()->user());
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

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

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/101217538?v=4)[Behnam Fereydooni](/maintainers/Behnamfe76)[@Behnamfe76](https://github.com/Behnamfe76)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/fereydooni-laravel-ticketable/health.svg)

```
[![Health](https://phpackages.com/badges/fereydooni-laravel-ticketable/health.svg)](https://phpackages.com/packages/fereydooni-laravel-ticketable)
```

###  Alternatives

[liborm85/composer-vendor-cleaner

Composer Vendor Cleaner removes unnecessary development files and directories from vendor directory.

34412.1k1](/packages/liborm85-composer-vendor-cleaner)

PHPackages © 2026

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