BelongsTo#
BelongsTo is a relation to one record of another resource,
belongsTo in the descriptor. It shows the target’s title and edits
with a searchable picker. titleField() overrides which field names the
target, and searchable() makes the list’s search match that title.
BelongsTo::to('category', CategoryResource::class)->sortable()->filterable()->searchable(),
BelongsTo::dependsOn(), which narrows the choices by another field, is
on Forms. A filterable belongs-to takes eq ne in nin
(Filter operators).
It is declared as every relation is, and takes the common modifiers too.