Hi everyone, I was wondering if there's a way to augment data that has been retrieved through queries in a custom controller. As an example, I have a query to retrieve some of the data from the cms:
$retreat = Collection::find('retreats') ->queryEntries() ->where('id', $id) ->where('published', true) ->where('enable_flyer', true) ->first();
Is there a way to augment those kind of results so it can be used the Statamic way in a template? As long as there are only simple fields that's not an issue, but when you have more complex data fields like Relations, Bard and so on it would be great to augment those fields so that they can be handled the usual way in a template.
Currently I'm doing further queries to resolve relationships and for Bard it will be stored as html.
Thanks for any suggestions : )