Let's assume that we have taken the translation of a post in this way:
$post = Post::with('translations')->get();
But here I want getTranslationsArray to be returned. Because I have dozens of models that should always be returned this way in any case. Of course, these models are related to admin and have nothing to do with front models.
Unfortunately, I did not find any solution. getTranslationsArray, which currently executes an additional query in the provided document, and once translations are taken normally, it is taken again as an array group by locale and imposes an additional task.
Let's assume that we have taken the translation of a post in this way:
$post = Post::with('translations')->get();
But here I want getTranslationsArray to be returned. Because I have dozens of models that should always be returned this way in any case. Of course, these models are related to admin and have nothing to do with front models. Unfortunately, I did not find any solution. getTranslationsArray, which currently executes an additional query in the provided document, and once translations are taken normally, it is taken again as an array group by locale and imposes an additional task.