Team-Tea-Time/laravel-forum

Debugbar suggest eager-load

nolsen89 opened this issue · 1 comments

"laravel/framework": "^9.11"
"riari/laravel-forum": "^5.3"
i have debugbar running and it suggest eager-load Threads with Category and Post with Thread, but i am not sure how i can include with(), so i can eager-load the models?

Riari commented

Hi,

The package already does eager loads in suitable places, and they're not always possible depending on other logic needed. I went over every case for version 5 to improve eager loading where possible (see #301 for example), so there likely isn't much room to improve it further.

If you want to take a closer look at it yourself and you find some cases that I missed, feel free to open a PR or a new issue with specific recommendations.

Thank you!