DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to route support tickets by department, urgency and churn risk with Laya PHP

Send each incoming ticket to the right team on your own server, with a confidence check for human review.

Short answer: Run composer require marcreichel/laya-php in your PHP project; then start the local server from a clone of this repo with docker compose up -d --wait, then check it with php artisan laya:health in a Laravel app. All steps.

Who it is forA support lead or backend developer whose help desk needs every ticket sorted without sending customer text to a paid LLM API.

The problemTickets arrive unsorted, and manual triage is slow. Sending customer text to a hosted LLM costs per token and leaves your infrastructure.

The outcomeEach ticket gets a typed department, urgency and churn flag, and low-confidence answers are routed to a person.

What you need first

  • PHP 8.4+ and Composer
  • A PSR-18 HTTP client such as Guzzle or Symfony HttpClient
  • Docker, to run laya-serve from the repo's compose.yaml
  • Laravel 13+ for the Laravel steps (service provider, artisan commands, validation rule, cast)

Steps

  1. Run composer require marcreichel/laya-php in your PHP project.
  2. Start the local server from a clone of this repo with docker compose up -d --wait, then check it with php artisan laya:health in a Laravel app.
  3. Write a readonly decision class with enum fields for department and urgency and a bool for churn, then try it with php artisan laya:try "App\Decisions\Triage" "Hi, we were billed twice for March. Refund it today or we cancel.".
  4. In your queued job, call $laya->decide($ticket->body, Triage::class) and save the department on the ticket.
  5. Compare answerConfidence with a threshold you choose and send low-confidence tickets to a human queue.

Prompt for your agent

Using the marcreichel/laya-php repo, add a readonly decision class for <ticket queue> with department, urgency and churn fields, and call Laya::decide on the ticket body. Report the typed result and its answerConfidence for a sample ticket, and verify that `php artisan laya:try` prints a hydrated value for that class.

Caveat. The SDK targets laya-serve running upstream Laya v0.4.6, and the README says it has not been tested against the hosted Jev API.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for marcreichel/laya-php and "Route support tickets by department, urgency and churn risk"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer