However, in the english version of the website, we don't really want aliments or musique in the available categories. As for the french version, we wouldn't want food or music in the constrains.
It is now possible to pass a locale as the third parameter when using the where method to apply the constraint only for a specific locale as of v2.7.0 and v1.10.0.
Let's say for instance we have the following translation in the routes file:
It is possible to constrain route parameters at the current time like this:
This will allow the following routes:
However, in the english version of the website, we don't really want
aliments
ormusique
in the available categories. As for the french version, we wouldn't wantfood
ormusic
in the constrains.