Closed Nowi5 closed 6 years ago
Hey @Nowi5 I agree that was complicated, I ended up adding a method to the base model called ->asObject()
in this case it will load the page as its translated object or its default based on the request, however that doesn't address your first point about the with
addition. I'll review that given that I have made changes which impact that
Hi all,
in case there are more than one language possible, you should improve the different repositories to load directly the translations and reduce the amount of SQL statements. For example in the PageRepository you can improve the "published" function by enhancing "->with('translation')"
Further you should improve the check if translation is needed. This is very complex:
The page attributes should be taken automatically if the config has 'auto-translate' => true.
What do you think about that?