Repository navigation
v2.17.0
[2.17.0] — 2026-11-05
Minor release from a batch of consumer reports: fields that a sibling shows or hides, actions that hide what a record cannot run or keep its slot, flat items in the row menu, confirmation texts that name the record, file fields in action modals, a create form prefilled from its link, a Badges field, and multi-column sorting. Two bugs found on the way are fixed: no dependsOn() change ever reached the live form, and a relation field ignored its related resource's title. Read Upgrading to v2.17.0.
Added
hide()/show()for a field, from adependsOn()callback, as Nova's dependent fields: a hidden field is not drawn and its value is left out of the submit, so an update keeps the stored value; a panel, section or tab whose fields are all hidden is not drawn. The callback also runs when the form opens. Changing a label from the callback withwithLabel()is now documented. See Fields → Show, hide and relabel a field from a sibling.Action::whenInapplicable(InapplicableAction::Disabled | Hide | KeepSlot): how an action is drawn for a record it cannot run, on the index rows, the relationship panels and the detail page.KeepSlotkeeps an invisible placeholder so the row icons line up. A group whose actions are all left out, and an empty "..." menu, are not drawn. The detail payload now carries the record's_actionAuthorization, so the detail page greys out (or leaves out) what the run would refuse. See Actions → An action a record cannot run.Action::inRowMenu()puts an inline action in the row's "..." menu as a flat item, andResource::$maxInlineButtonsmoves the row buttons past a limit there. See Actions → Buttons and the "..." menu.confirmText(),confirmButtonText()andcancelButtonText()take a closure(Request, ?Model, int $count), resolved with the record the modal runs on by the fields request the modal already makes. See Actions → A text that names the record.- File fields in the action modal: a run whose fields hold a file posts multipart, and
handle()receives theUploadedFile, validated by the field's own rules. A queued action that receives an upload throws, as Nova does not support it either. See Actions → File fields. Resource::acceptsPrefill(): a create page forwards the query keys the resource declares to its schema, sodefault(fn ($request) => $request->query('of'))prefills the form from a link; a value the user could not pick is dropped.Field::sticky()keeps a field's value for the next record on "Create & add another". See Resources → Prefill the create form from a link.Badgesfield: one value drawn as several pills, withBadge's types and mapping. See Fields → Badges.- Sorting by several columns.
?sort=category:asc,position:asc,locale:desc(up to 3 keys;?sort=title&direction=descstill works) on the index, lenses and relationship panels. Shift+click (or Shift+Enter) on a header adds a column or cycles it asc, desc, removed, with 1/2/3 badges, and a "Sorted by" chip on the index toolbar reorders, flips, removes or adds keys, for keyboard and touch.defaultSort()may return an ordered['column' => SortDirection]array, and its keys break the ties of the user's sort, so one click on a column keeps the resource's order inside it.Field::sortUsing(Closure)sorts a column by an expression (a related table's order, a computed key). The index keeps the list in its sticky view. See Resources → Sorting by several columns.
Fixed
dependsOn()changes reach the form. The sync endpoint answers{ data: descriptor }and the form stored the whole envelope as the field's override, so no change made in a callback (required, options, help, label, visibility) was ever applied on the client, sincedependsOn()was introduced.- A relation field shows its related resource's title. A
BelongsTo(andTag,BelongsToMany,MorphToMany) withouttitleAttribute()readnameand ignored the related resource, so a model without anamecolumn showed#4in the cell while the picker showed the right label. It now uses the related resource'stitle()when that resource declares a title, as Nova does; an explicittitleAttribute()still wins. See Fields → BelongsTo.
Changed
- The detail page greys out the actions its record cannot run, from the same verdict as an index row, as Nova's detail menu does. Before, it offered every action and the run refused the record.
- A list always ends its order on the primary key, after the requested and default keys, so pagination is stable: rows that tie on a non-unique column may come in another order than before. A relationship panel with no requested sort now follows its related resource's
defaultSort(). - Schema payload and
component:Tableoverride. The schema'sdefaultSortis[{ attribute, direction }]anddefaultSortDirectionis gone. A customcomponent:Tableoverride receivessort(the list of keys) andonSort(attribute, additive)instead ofsortBy,sortDirandonSort(attribute). The table no longer re-sorts its rows on the client: the server's order is shown as it comes. ActionContract::confirmText(),confirmButtonText()andcancelButtonText()acceptstring|Closure. A class that implements the contract directly (not throughAction) widens its parameter type.