Have you seen our video tutorials? Check 'em out!

How to filter translatable field

ndlinh - 1 week ago

I have a model with field "title" which is translatable. I want to query all records that have "title" like something. How can I do this. I know I can manual join translation table to do this but I think there is another way. Please help.

ryanthompson - 1 week ago

It should search the active locale by default: https://github.com/anomalylabs/streams-platform/blob/master/src/Addon/FieldType/FieldTypeQuery.php#L56-L87

Note the joining in there done for you and the app.locale being used in the where clause.