title: Laravel adding WHERE to DB::raw and Joins
body: <p>Here is my code:</p>
  
  <pre><code>return ExportInvoice::join('sold_products', 'sold_products.export_invoice_id', '=', 'export_invoices.id')
          -&gt;join('products', 'sold_products.product_id', '=', 'products.id')
          -&gt;select(
              'sold_products.product_id',
              'products.name',
              DB::raw('
                  round(round(sum(round(sold_products.sold_price * sold_products.quantity * (1 - sold_products.discount / 100), 2))
                   * (1 - export_invoices.discount / 100), 2) * (1 + IF(export_invoices.tax, 14, 0) / 100), 2)
                   as total
              ')
          )
          -&gt;groupBy('sold_products.product_id', 'products.name', 'export_invoices.discount', 'export_invoices.tax')
          -&gt;orderBy('total', 'DESC')
          -&gt;limit(100)
          -&gt;get();
  </code></pre>
  
  <h1>What I am trying to do:</h1>
  
  <p>I am trying to add <code>whereNotNull('export_invoices.deleted_at')</code> and <code>whereNotNull('sold_products.deleted_at')</code> because I am using Laravel soft delete and the above query return all data even those who are soft-deleted.</p>