Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents eDock A container runtime for the Mac Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Reference
Ratatosk CLI
Roadmap
RFC 0001: make:resource
RFC 0002: live queries
RFC 0003: MCP server
RFC 0004: MCP resource templates
RFC 0005: a Laravel backend
RFC 0006: Laravel broadcasting
RFC 0007: offline and sync
RFC 0008: Laravel notifications
RFC 0009: Files
RFC 0010: Laravel abilities
RFC 0011: an assistant in the app
RFC 0012: @elyra/ui
RFC 0013: the assistant sees the window
RFC 0014: Elyra Inspector
RFC 0015: presence
RFC 0016: capabilities per window
RFC 0017: record invalidation
RFC 0018: the assistant's answer, streamed
RFC 0019: a window from the tray
RFC 0020: an app that stays in the tray
RFC 0021: a server chosen at sign-in
RFC 0022: signed in to more than one server
RFC 0023: private channels a window listens to
RFC 0024: updates from the backend
RFC 0025: commands and configuration
RFC 0026: the running app, for coding agents
RFC 0027: the assistant's code mode
RFC 0028: the tray's icon, and the app's
RFC 0029: installers
RFC 0030: the app's identity on Windows
RFC 0031: a token per workspace
RFC 0032: the microphone
RFC 0033: diagnostics the user can send
RFC 0034: one screen in several states at once
RFC 0035: point at it, and hand it to the agent
RFC 0036: rata check, the app checked as a whole
RFC 0037: Theme Studio
RFC 0038: edit it in its own app
RFC 0039: a write shown at once in every window
RFC 0040: the two halves agree
RFC 0041: Quick Look
RFC 0042: follow a colleague
RFC 0043: every write seen
RFC 0044: composite keys
RFC 0045: bigint all the way
RFC 0046: pivot columns
RFC 0047: relations on any key
RFC 0048: more providers
RFC 0049: OpenAI web search
RFC 0050: integer-keyed arguments
RFC 0051: citations
RFC 0052: open documents
RFC 0053: exit hooks
RFC 0054: the gui feature
RFC 0055: menus that change
RFC 0056: the framework's own words
RFC 0057: rata upgrade
RFC 0058: @elyra/charts
RFC 0059: all of WireCharts
RFC 0060: exporting a chart
RFC 0061: zoom
RFC 0062: printing
RFC 0063: linked charts
RFC 0064: report pages
RFC 0065: marks
RFC 0066: taking a table out
RFC 0067: totals
RFC 0068: columns the user picks
RFC 0069: filters
RFC 0070: saved views
RFC 0071: lists over Laravel
RFC 0072: targets
RFC 0073: every row out
RFC 0074: grouped rows
RFC 0075: pinned columns
RFC 0076: views on the server
RFC 0077: every match selected
RFC 0078: editing in the table
RFC 0079: many cells at once
RFC 0080: a value for the selected rows
RFC 0081: a new row in the table
RFC 0082: a related record in a cell
RFC 0083: a filter by a related record
RFC 0084: one write for many rows
RFC 0085: the keys shown
RFC 0086: many rows in Laravel
RFC 0087: many rows deleted
RFC 0088: the trash
Release notes
Changelog
Elyra
RFC 0086 — Many rows in Laravel: `elyraUpdateMany`, a set answered by the package

RFC 0086 — Many rows in Laravel: elyraUpdateMany, a set answered by the package

Status: implemented (2026-11-30) · Target: 0.66.0 · builds on RFC 0071 and RFC 0084 · see Decisions

Summary

RFC 0084 lets a desktop table set a column for thousands of rows in calls of 500: PATCH /api/invoices with { ids, values }, answered { updated, failed }. Over a Laravel backend, make:resource --backend prints an outline of the controller method, and the app writes it: the validation of the fields given, each model's policy, a transaction, the answer's shape. It's the same method in every app, and easy to get subtly wrong (validating fields that weren't sent, skipping the policy, failing the whole set for one row).

This RFC puts it in the package, as elyraList (RFC 0071) did for the list:

public function updateMany(Request $request)
{
    return Invoice::query()->elyraUpdateMany($request, [
        'rules' => (new UpdateInvoiceRequest)->rules(),
        'columns' => ['status', 'due', 'reminded'],
        'ability' => 'update',
    ]);
}
Route::patch('invoices', [InvoiceController::class, 'updateMany']);
Route::apiResource('invoices', InvoiceController::class);
  • Only the fields given, and only the columns the controller allows, each validated with its own rules from the update's.
  • Each row's policy ($user->can('update', $invoice)), so a user sets only the rows they may.
  • One transaction for the rows that pass, and the answer the desktop reads: { updated, failed: { id: message } }.
  • make:resource --backend prints the call, not an outline.

Motivation

  • RFC 0084 left the server to each app. The desktop side is generated; the Laravel side is a hint, which is where a set of 8,000 rows meets the real policies.
  • The same method, written again. Validate the fields given, check each row's policy, update in one transaction, answer in the desktop's shape: none of it differs between resources but the rules and the columns.
  • The package already answers lists this way. elyraList takes the controller's allowlists and answers the desktop's question; a set is the list's other half.

Current state (0.66)

  • Builder::macro('elyraList', …) answers a desktop list (RFC 0071).
  • A desktop {p}_update_many over a backend sends PATCH {path} with { ids: [...], values: { column: value } }, only the fields given (RFC 0084); it reads { updated, failed: { id: message } }.
  • make:resource --backend prints, for it: "a method that validates the given values with the update rules, updates each row the user may update in a transaction, and answers { updated, failed }".

Design

->elyraUpdateMany($request, $options)

A Builder macro, on the query the rows are found through (so a scope, a tenant, soft deletes apply):

Option
rules array The update's rules, by field: only the ones for the fields given are used.
columns string[] The fields a set may change. Anything else in values is refused, the whole request (a 422 for the field).
ability string|null The policy ability checked per row ('update' by default); null skips it.
max int The most ids a request takes (500, RFC 0084's chunk); more is a 422.

What it does:

  1. The request: ids (a list of keys, at most max) and values (an object of the allowed columns). Anything else is a 422.
  2. The values, validated once, with their rules from rules (a unique rule for more than one id is a 422: it can't be unique for many), as Laravel's validator does a request, so the 422 is the one a form gets.
  3. The rows: whereKey($ids) on the query. A key not found is failed ("not found"); a row the policy refuses is failed with the policy's message.
  4. The write: in one transaction, each passing model's fill($values) ->save(), so its events, casts and updated_at work; or, with 'quietly' => true, one update() on their keys without events.
  5. The answer: { "updated": 238, "failed": { "12": "This invoice is locked." } }, 200.

make:resource --backend

The hint prints the route and the method with elyraUpdateMany, its columns the fields a patch sets (RFC 0084's patchable), and rules from the resource's update request when it has one.

The guide

docs/backend.md gets "Many rows at once", beside "Lists searched, filtered and totalled", with the request, the answer and the options.

Implementation plan

  1. laravel/src/Lists/ElyraUpdateMany.php: the request's checks, the values' validation, the rows, the policy per row, the transaction, the answer; the Builder macro in the service provider.
  2. The test app the Laravel CI job builds: a route and a policy that use it, and framework/tests/laravel_update_many.rs against it: only the given fields and the allowed columns, a refused column, a unique rule for many, max, a key not found, a policy that refuses one row, the events by default and quietly, a scope on the query respected, the answer's shape, and a desktop {p}_update_many through it.
  3. ratatosk: the hint's method with elyraUpdateMany.
  4. Docs: backend.md, laravel/README.md, resources.md, the Laravel backend skill, CHANGELOG.

Open questions

  1. fill()->save() per row, or one update()? Recommendation: per row, by default, in one transaction: a model's events, observers, casts and updated_at are what an app relies on, and 500 saves in a transaction are quick. 'quietly' => true for a table that wants the one statement.
  2. A refused column: the whole request, or the field left out? Recommendation: the whole request, a 422. The desktop sends what the user set; silently dropping it would say "set" for a value that wasn't.
  3. The policy per row, or viewAny-style once? Recommendation: per row, as update checks one model: a policy that depends on the record (its owner, its state) is the common one.

Decisions

Accepted 2026-11-30, with the open questions' recommendations:

  1. fill()->save() per row in one transaction by default; 'quietly' => true for one update().
  2. A column not allowed refuses the request, a 422 for the field.
  3. The policy per row.

As built

As designed, with these differences:

  • Each row is saved with forceFill(), not fill(): the columns are the controller's allowlist, so a column that isn't in $fillable but is allowed here is set.
  • The answer's keys are the ids as text (JSON object keys), as the desktop reads them.
  • The hint's rules are the resource's own, each sometimes|, since a patch gives only some fields; an app with a FormRequest passes its rules() instead.
  • Tested against the test app the Laravel CI job builds: a PATCH /api/customers route, a CustomerPolicy::update that refuses a locked customer and a user without customers.update, and framework/tests/laravel_update_many.rs, a step of its own in the job. quietly isn't exercised there.

Not in this RFC

  • Deleting many rows in one request (elyraDestroyMany).
  • A job for sets larger than a request (queued, with progress over broadcasting).
  • Different values per row (a paste) in one request.

Alternatives considered

  • Keep the hint. Every app writes the same method, and the policy per row is the step most likely to be left out.
  • A controller trait (use ElyraUpdatesMany). It ties the method's name and route to the package; a macro on the query lets the app keep its controller and its scopes.