protected function makeJoins(&$query) { foreach ($this->getJoins() as $table => $keys) { $query->join($table, $keys[0], '=', $keys[1]); } }