Closes #469. After this change, models are essentially eager-loaded, using the findMany method inside getSelectedItems. See #469 for a before, and here's an after (see query counter in the debugbar):
This also has (what I would consider) an added benefit, by returning an eloquent collection, instead of a generic collection. Allows you to do some handy things within the Action class itself, like $items->load('anotherRelation'). Wanted to mention this in case it impacts anything downstream that I'm unaware of, but should just be a net-positive since the eloquent collection class extends the base collection class. 👍
Closes #469. After this change, models are essentially eager-loaded, using the
findMany
method insidegetSelectedItems
. See #469 for a before, and here's an after (see query counter in the debugbar):This also has (what I would consider) an added benefit, by returning an eloquent collection, instead of a generic collection. Allows you to do some handy things within the
Action
class itself, like$items->load('anotherRelation')
. Wanted to mention this in case it impacts anything downstream that I'm unaware of, but should just be a net-positive since the eloquent collection class extends the base collection class. 👍Let me know if we need to tweak anything, here!