So working with queries…and I stumbled upon the next thing, as im getting results from 1 table which compairs data from a different table which goes good, but I need to add a matching value from the table that I use to compair it to.
$slugs = $query->select('language, translation, cms_module_id')
->from(['cbt'=>'cms_module_translation'])
->leftJoin(['cb'=>'cms_module'], 'cb.id=cbt.cms_module_id')
->where(['cb.is_deleted' => 0,
'cb.is_enabled' => 1,
'cbt.attribute' => 'slug'])
->all();
The table cms_module contains a field called ‘route’, and I want to add this value to results (route is the same as the cms_module_id)