Ticket Methods
The ticket
model came with handy methods to use, to make your building process easy and fast, and here is the list of the available API:
Method | Arguments | Description | Example | Chainable |
---|---|---|---|---|
archive |
void |
archive the ticket | $ticket->archive() |
✓ |
close |
void |
close the ticket | $ticket->close() |
✓ |
reopen |
void |
reopen a closed ticket | $ticket->reopen() |
✓ |
markAsResolved |
void |
mark the ticket as resolved | $ticket->markAsResolved() |
✓ |
markAsLocked |
void |
mark the ticket as locked | $ticket->markAsLocked() |
✓ |
markAsUnlocked |
void |
mark the ticket as unlocked | $ticket->markAsUnlocked() |
✓ |
markAsArchived |
void |
mark the ticket as archived | $ticket->markAsArchived() |
✓ |
closeAsResolved |
void |
close the ticket and marked it as resolved | $ticket->closeAsResolved() |
✓ |
closeAsUnresolved |
void |
close the ticket and marked it as unresolved | $ticket->closeAsUnresolved() |
✓ |
reopenAsUnresolved |
void |
reopen the ticket and marked it as unresolved | $ticket->reopenAsUnresolved() |
✓ |
isArchived |
void |
check if the ticket archived | $ticket->isArchived() |
✗ |
isOpen |
void |
check if the ticket open | $ticket->isOpen() |
✗ |
isClosed |
void |
check if the ticket closed | $ticket->isClosed() |
✗ |
isResolved |
void |
check if the ticket has a resolved status | $ticket->isResolved() |
✗ |
isUnresolved |
void |
check if the ticket has an unresolved status | $ticket->isUnresolved() |
✗ |
isLocked |
void |
check if the ticket is locked | $ticket->isLocked() |
✗ |
isUnlocked |
void |
check if the ticket is unlocked | $ticket->isUnlocked() |
✗ |
assignTo |
void |
assign ticket to a user | $ticket->assignTo($user) or $ticket->assignTo(2) |
✓ |
The Chainable column, is showing the state for the method, that if it can be chained or not, something like
1$ticket->archive()2 ->close()3 ->markAsResolved();