withtakes one parameter, the name of the relationship to load. Note that this is the name of the function, not the entity name. For example:
post.getAuthor()it will use the fetched relationship value instead of going to the database.
withor by calling
withfunction. The key should be the name of the relationship and the value should be a function. This function will accept the related entity as its only argument. Here is an example:
within your constraint callback to continue eager loading relationships.
loadhas the same function signature as
QuickCollectionis the object returned for all Quick queries that return more than one record. Read more about it in Collections.