OmgDef / yii2-multilingual-behavior

Yii2 port of the yii-multilingual-behavior.
146 stars 60 forks source link

Search implementation #70

Closed Mandzuk closed 6 years ago

Mandzuk commented 6 years ago

Hello. I have read your documentation. But there is a question. Is it possible to implement a search in the main model by the field in the table Lang. For example, I have Post and PostLand models. Fileld title is in PostLand. How I can do search Post::find()->where(['like', 'title', $slug])->all() ?

OmgDef commented 6 years ago

Hello. Just use joinWith('translations') and filter content as usual

Mandzuk commented 6 years ago

Hello. I apologize for the long response. Thanks, it helped.