All jobs

Build an Admin Page in a Laravel App

An agent adds a Laravel admin page for reported threads, with a protected resolve action, permission tests and browser evidence your team can review.

Run this on RushIn a Project that has your repository.

What the agent does

The agent reads the moderation model before choosing an admin component. In laravelio/laravel.io, Composer requires PHP 8.4.*, Laravel ^11.5, Livewire ^3.3 and Filament ^4.0. The application already has an admin panel, so installing another dashboard package would create an unnecessary second surface. AdminPanelProvider uses the admin path and discovers pages and resources under app/Filament. The agent locates the nearest existing resource and follows its layout, navigation and action conventions.

It traces what a reported thread actually means. ReportSpam attaches the reporting user through spamReportersRelation() and emits SpamWasReported; Thread maps that relation to spam_reports. Thread resolution elsewhere means associating a solution reply and the person who selected it. Resolving a moderation report must not accidentally mark the discussion as answered. Before writing the action, the agent presents the intended report-resolution behavior, including whether reports remain available for audit and how repeated clicks behave, and ends its turn for the team's decision.

After the team answers, the implementation adds a reported-thread list to the existing panel and enforces the requested administrator-only access on both the list and the action. That distinction matters here: AdminTest already checks that ordinary users are forbidden while both admins and moderators can see the users overview. The new page's narrower permission must not inherit broader access by accident. Tests submit the resolve action directly as a guest, ordinary user and moderator as well as an administrator, checking that refusals leave the reports unchanged.

The agent installs the locked PHP dependencies, prepares a disposable database and runs php artisan test --filter=AdminTest before the wider relevant suite. package.json exposes Vite development and build scripts, so browser verification includes npm run build and the application's local server setup. Synthetic threads demonstrate unresolved reports, the empty state and the result of a successful resolution. The team reviews screenshots and the recorded action behavior through the session result, then sends any requested adjustments as a follow-up after the turn finishes. New dependencies require approval.

Start it with one API call

POST https://api.prix.dev/o/{org}/sessions with this body:

{
  "agent": "codex",
  "input": "Build an administrator-only page listing reported forum threads with a one-click moderation-report resolve action. Inspect the existing Filament panel, spam_reports relation, reporting job, role rules and Pest tests first. Do not confuse moderation resolution with marking a reply as the thread's solution. Propose the exact resolution/audit behavior and any necessary schema change, then end the turn waiting for a follow-up approval. After approval, extend the existing admin surface and enforce authorization on the list and action, including denying moderators if the requirement remains admin-only. Test direct unauthorized actions and unchanged state, repeated resolution and the empty list. Use synthetic reports for browser screenshots. Run focused AdminTest checks, relevant tests and the frontend build, reporting blocked checks honestly. Ask before adding dependencies and open a pull request with the evidence.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.prix.dev/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

The result is a pull request extending the existing Filament admin surface, with the reported-thread query, resolve action and regression tests. Any approved migration appears separately in the explanation, with its purpose and retained audit information stated. The diff avoids replacing the forum's solution-selection behavior or broadening moderator permissions as a side effect.

A reviewer checks the action's server-side permission, the exact meaning of resolution and whether a repeated request is safe. Screenshots show the intended admin experience with synthetic content, while test output supports the refusal cases that a screenshot cannot prove. The session transcript retains the commands and the proposal turn so the team can compare the delivered behavior with what it approved.

Run it on every moderation-tooling request

Connect your internal request form or ticket webhook to a server that submits the repository and acceptance criteria to Rush. Start a run when the team approves building a moderation tool, not for every incoming spam report. Record the returned session identifier with that request. After the proposal turn ends, send the agreed resolution semantics to the same session's messages endpoint; a completion webhook can tell your review system when implementation is ready.

The use case this job follows, with its automation and trigger: Steer a run as a team.

Why run it on Rush?

Moderation tools need realistic role checks and database state, not just a convincing table. In its own Rush sandbox, the agent can create synthetic reports, exercise the protected action and retain the command output without touching the team's working forum. A rejected moderator action and an administrator's successful action can be reviewed as separate behaviors.

The review pause keeps a product decision visible: resolving a report is different from resolving a discussion. The API retains the session result and transcript, and a follow-up wakes the parked sandbox after the team decides. Independent page requests can run separately within your key's concurrency limit, each with its own branch and review evidence.

Frequently asked questions

Will it install a new admin framework?

The example application already declares Filament and an admin panel. This request tells the agent to extend that surface and ask before adding dependencies.

Does resolving a report mark a thread as solved?

It should not unless your team explicitly requests that behavior. The example model's solution reply and moderation reports are distinct concepts, so the proposal must keep them separate.

Can moderators use the new page?

The supplied task says administrator-only even though existing admin features allow moderators. The new tests must make that narrower rule explicit for both viewing and resolving.

How do we request changes after reviewing the screenshots?

Wait for the current turn to finish, then send the requested adjustment to the session messages endpoint. Include the affected screenshot or state so the agent verifies the same interaction again.