Repair shop job tickets: a Laravel API and admin page
A job-ticket API with token sign-in, a strict status workflow and a filterable admin page, covered by 20 feature tests.
Demo project, fictional brand · Laravel

The problem
A small repair shop tracks jobs on paper and loses them. It needs one place where tickets are created, move forward in order, and can be found again, from a script or from a browser.
How it was tested
- 20 of 20 feature tests pass, 67 assertions (PHPUnit, run with a fresh SQLite database per test).
- Breaking the status rule on purpose made the forbidden-transition test fail, so the test really guards it.
- Real run: the app served locally, 5 recorded calls (200, 422, 422, 200, 401), and the admin page checked at 1440 and 390 px wide with no sideways scroll.
Endpoints
| Call | What it does |
|---|---|
POST /api/login | Checks the staff login and returns an API token. |
GET /api/tickets | Paginated list. Filters: status, priority, search text, per_page. |
POST /api/tickets | Creates a ticket. It always starts as open. |
GET /api/tickets/{id} | One ticket, or 404. |
PATCH /api/tickets/{id} | Edits fields. It cannot change the status. |
PATCH /api/tickets/{id}/status | Moves a ticket one step: open, in progress, done. Any other jump returns 422. |
DELETE /api/tickets/{id} | Removes a ticket (204). |
Every ticket call needs a Bearer token and answers 401 without one. Errors come back as JSON with one message per field.
What I built
- Token sign-in with Laravel Sanctum, and a rate limit on the login call.
- Validation in form-request classes: required fields, allowed priorities (low, normal, high, urgent), bad filter values refused.
- A status workflow kept in one enum, so the API and the admin page cannot disagree.
- A Blade admin page behind a login: status counts, search, status and priority filters, paging, and a stacked card layout on a phone. Ticket text is escaped, and a test proves it.
Code excerpt
enum TicketStatus: string
{
case Open = 'open';
case InProgress = 'in_progress';
case Done = 'done';
public function next(): ?self
{
return match ($this) {
self::Open => self::InProgress,
self::InProgress => self::Done,
self::Done => null,
};
}
public function canMoveTo(self $target): bool
{
return $this->next() === $target;
}
}
// UpdateStatusRequest: the workflow check runs with validation
if (! $ticket->status->canMoveTo($target)) {
$validator->errors()->add('status',
"A ticket that is {$ticket->status->value} cannot move to {$target->value}.");
}
Only a short excerpt. The whole app is not published.
Screens

Built with: Laravel, PHP, Sanctum, SQLite, Blade, PHPUnit
Tell me how your team tracks work today and I will sketch the tickets and steps first.Contact me