fereydooni / laravel-ticketing
Reusable Laravel package for support and service desk ticketing.
Requires
- php: ^8.3
- illuminate/auth: ^11.0 || ^12.0
- illuminate/console: ^11.0 || ^12.0
- illuminate/contracts: ^11.0 || ^12.0
- illuminate/database: ^11.0 || ^12.0
- illuminate/events: ^11.0 || ^12.0
- illuminate/http: ^11.0 || ^12.0
- illuminate/mail: ^11.0 || ^12.0
- illuminate/notifications: ^11.0 || ^12.0
- illuminate/queue: ^11.0 || ^12.0
- illuminate/routing: ^11.0 || ^12.0
- illuminate/support: ^11.0 || ^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.0 || ^10.0
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-04-30 14:47:52 UTC
README
Reusable Laravel package for support and service desk ticketing in existing Laravel applications. The package provides a Laravel-native service provider, publishable configuration and migrations, Eloquent models, lifecycle actions, policies, API and UI adapters, email ingestion hooks, reporting hooks, and explicit extension contracts.
Requirements
- PHP 8.3+
- Laravel 11 or 12 component versions
- A host application user model and authentication flow
- A relational database supported by Laravel migrations
Installation
composer require fereydooni/laravel-ticketing php artisan ticketing:install php artisan migrate
The install command publishes ticketing-config, ticketing-migrations, and
ticketing-lang. Publish views separately when customizing the optional staff adapter:
php artisan vendor:publish --tag=ticketing-views
Configuration
Review config/ticketing.php after publishing. The important sections are:
models: configurable model map for package entities.features: opt-in switches for portal, staff, API, mail, notifications, queues, attachments, and multi-tenancy.routes: route prefixes and middleware for portal, staff, and API entry points.attachments: disk, directory, visibility, and signed URL behavior.auth: host auth model and guard integration hints.tenancy: tenant resolver and tenant column configuration.mail: inbound mailbox, outbound sender, and unmatched message behavior.queue: connection and queue name for ticketing work.
Abilities and default role mappings live in config/ticketing-permissions.php.
Host applications can replace the MapsTicketRoles binding to integrate with their own
authorization system.
Incremental Adoption
- Enable the core lifecycle first: ticket creation, replies, assignment, audit records, and notifications.
- Add workflow configuration: statuses, priorities, categories, queues, tags, saved views, SLA policies, automation rules, and custom fields.
- Enable integrations as needed: REST API routes, inbound email, outbound thread recording, reporting hooks, staff dashboard routes, and portal routes.
Entry Points
- Portal routes:
tickets/* - Staff routes:
staff/tickets/* - API routes:
api/ticketing/* - Internal workflows: resolve container contracts such as
CreatesTickets,AddsTicketReplies,AssignsTickets,ProcessesInboundTicketMail, andPublishesTicketMetrics.
Testing
composer test
composer test:unit
composer test:feature
composer test:integration
The package test suite uses PHPUnit and Orchestra Testbench.