When a resource has a type field Relationship
, especially the BelongsToMany field, a list of associated models is always displayed. That list always has 5 items and their respective "Previous" and "Next" buttons.
For example, if I have a resource of Client
and a relation to another resource Product
,
How can I change the number of product rows displayed?
For some strange reason, this property is not documented in Laravel Nova. In order to display a larger number of rows, it is necessary to use the following property in the resource
Product
In this way, when consulting the products associated with the client, the first 15 will be displayed, instead of the first 5. It is important to emphasize that this configuration only works when the resource is consulted through a relationship and one works in the view Index.
The only place where I have been able to find this information is in a Github issue , in one of the comments.