All packages
Tickets for Laravel
Projects
Projects are a contract only — your own model (or a future projects package) implements it:
use RoundlyConsulting\Tickets\Concerns\HasTickets;
use RoundlyConsulting\Tickets\Contracts\TicketProject;
final class Project extends Model implements TicketProject
{
use HasTickets;
public function ticketReferencePrefix(): string
{
return $this->key; // 'SUP' → SUP-1, SUP-2, …; ^[A-Z][A-Z0-9]{0,9}$, unique across projects
}
}
$ticket = $project->openTicket()->subject('…')->requester($user)->create(); // SUP-1
Tickets::project($project)->tickets()->unresolved()->count();
Tickets::project($project)->for('SUP-1'); // a ticket of another project throws
Tickets::project($project)->categories(); // global + the project's- Each project numbers its tickets in its own sequence; the prefix must match ^[A-Z][A-Z0-9]{0,9}$ and be unique across projects (DuplicateTicketReferenceException otherwise).
- Categories, fields and tags are global or per project; a ticket’s category, fields and tags must be global or its project’s.
- The project is set once, at creation — moving a ticket between projects is not supported.
- Add the class to tickets.projects (['project' => Project::class]) for the API and filter[project]=project:42.
- Links and merges across projects are governed by tickets.links.cross_project (on) and tickets.merge.cross_project (off); an AgentScope can keep agents on their own projects (see Policy and agent scope).
Show your open-source love
This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.
More ways to support, including cryptoBy donating, you agree to our donation terms.
Want this built into your product?
We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.