title: laravel raw join query
body: <p>I have a function that accepts raw where conditions and joins:</p>
  
  <pre><code>query('data',['fieldA','fieldB'], 'fieldA &gt; 10 AND fieldB &lt; 20', 'LEFT JOIN users ON data.user_id = users.id');
  
  function query($table, $keys = [], $where = '', $joins = '') {
     $query = DB::table($table)-&gt;select($keys);
     if(!empty($where)) {
        $query=$query-&gt;whereRaw($where);
     }
     if(!empty($joins)) {
        $query=$query-&gt;?????????????
     }
     return $query-&gt;get();
  }
  </code></pre>
  
  <p>How do I use the raw join with the query builder the way I can use whereRaw for the where condition?</p>