Skip to content

I set to_array_always_loads_translations to false, but still the translation is automatically taken in relations. #428

Answered by nekooee
nekooee asked this question in Q&A
Discussion options

You must be logged in to vote

I understood what the problem was. I had forgotten that I had put this code in one of the middlewares:

if (auth()->check() && auth()->user()->admin) {
            config(['translatable.to_array_always_loads_translations' => true]);
            return $next($request);
        }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gummibeer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
1 participant
Converted from issue

This discussion was converted from issue #421 on August 26, 2024 16:00.