title: Laravel union and join in the query
body: <p>I have 3 tables</p>
  
  <ol>
  <li><strong>send_to_employees</strong></li>
  <li><strong>onprocess</strong></li>
  <li><strong>employees</strong></li>
  </ol>
  
  <p>I want to do union of the two table <code>send_to_employees</code> and <code>onprocess</code>. After that I want to join the result with the <code>employees</code> table.</p>
  
  <p>I have done it in a raw SQL query like the following already:</p>
  
  <pre><code>SELECT * 
  FROM (
    SELECT
      send_to_employees.caseid,
      send_to_employees.docs,
      send_to_employees.helper,
      send_to_employees.employee_id 
    FROM send_to_employees
    UNION
    SELECT
      onprocess.caseid, 
      onprocess.docs, 
      onprocess.helper, 
      onprocess.employee_id
    FROM onprocess
  ) t1 
  INNER JOIN employees 
    ON employees.employee_id = t1.employee_id
  </code></pre>
  
  <p>But I can't figure out how to do it with Laravel. Please help me to write this query using the query builder of Laravel 5.8.</p>