eloquent-filemaker
eloquent-filemaker copied to clipboard
Add ability to limit portal results when using the Eloquent query builder
trafficstars
This PR adds the ability to increase the amount of returned portal records when using the Eloquent builder. This allows the user to have more then the default of 50 records returned when using the FMModel.
For example; we have a layout 'Users' with a portal 'LogEntries' containing 100 lines. With the current version it is not possible to retrieve all log entries when having the User as an FMModel instance, since this always returns the default limit of 50 related records.
When this PR gets merged, we can instead chain the limitPortal method when retrieving a user and get all the logentries like this:
$user = User::query()->limitPortal('LogEntries', 200)->first();