izica / relations-widgets-for-backpack

Views/widgets for preview laravel relations in laravel backpack
MIT License
28 stars 13 forks source link

Alter the query for loading the relationship #12

Closed smile2day123 closed 1 year ago

smile2day123 commented 1 year ago

Thank you so much for this very helpful package! I need to be able to change the query used to load the data for the widget (to add a group by and count for example). Is there any way I can do this? What is the parameter called? I tried closure and function, neither of which worked.

Thank you again!

smile2day123 commented 1 year ago

I figured it out - I altered the relationship function on the model. Thanks again!