title: Lumen eloquent left join
body: <p>I want to make some migration from Laravel to Lumen, before that every code on my Laravel working and has no error and running well. Then i found this line and eloquent in Lumen translate this different than Laravel.</p>
  
  <pre><code>DB::table('products_categories')
          -&gt;select('products.*', 'brands.name as brand_name', 'categories.link_rewrite as category_link_rewrite',
              'product_medias.id as id_image', 'product_stocks.quantity as product_stock', 'product_medias.path','product_medias.filename', 'specific_prices.reduction_type', 'specific_prices.reduction as reduction',
              'specific_prices.reduction', 'products_categories.position')
          -&gt;leftJoin('products', 'products.id', '=', 'products_categories.product_id')
          -&gt;leftJoin('product_stocks', 'products.id', '=', 'product_stocks.product_id')
          -&gt;leftJoin('brands', 'brands.id', '=', 'products.brand_id')
          -&gt;leftjoin('product_medias', function($join){
                  $join-&gt;on('product_medias.product_id', '=', 'products.id')
                      -&gt;whereIn('product_medias.cover', [1, 0]);
              })
          -&gt;leftJoin('categories', 'products_categories.category_id', '=', 'categories.id')
          -&gt;leftJoin('specific_prices', function($join){
                  $join-&gt;on('specific_prices.product_id', '=', 'products.id')
                  -&gt;on(DB::raw("(`specific_prices`.`from` = '0000-00-00 00:00:00' OR '".date('Y-m-d H:i:s')."' &gt;=  `specific_prices`.`from`)"), DB::raw(''), DB::raw(''));
  
          })
          -&gt;where('categories.name','=', "Special Price" )
          -&gt;where('products.active','=', 1)
          -&gt;whereNull('products.deleted_at')
          -&gt;groupBy('products_categories.product_id')
          -&gt;orderBy('products_categories.id', 'desc');
  </code></pre>
  
  <p>Once again it's working on my Laravel but i get 'Error' on Lumen, is there any solution to solve this?</p>
  
  <p>If i dump this line the query will look like this :</p>
  
  <pre><code> select `products`.*, `brands`.`name` as `brand_name`, `categories`.`link_rewrite` as `category_link_rewrite`, `product_medias`.`id` as `id_image`, `product_stocks`.`quantity` as `product_stock`, `product_medias`.`path`, `product_medias`.`filename`, `specific_prices`.`reduction_type`, `specific_prices`.`reduction` as `reduction`, `specific_prices`.`reduction`, `products_categories`.`position` from `products_categories` left join `products` on `products`.`id` = `products_categories`.`product_id` left join `product_stocks` on `products`.`id` = `product_stocks`.`product_id` left join `brands` on `brands`.`id` = `products`.`brand_id` left join `product_medias` on `product_medias`.`product_id` = `products`.`id` and `product_medias`.`cover` in (1, 0) left join `categories` on `products_categories`.`category_id` = `categories`.`id` left join `specific_prices` on `specific_prices`.`product_id` = `products`.`id` and (`specific_prices`.`from` = '0000-00-00 00:00:00' OR '2016-11-14 09:12:44' &gt;= `specific_prices`.`from`) = where `categories`.`name` = Special Price and `products`.`active` = 1 and `products`.`deleted_at` is null group by `products_categories`.`product_id` order by `products_categories`.`id` desc limit 10
  </code></pre>
  
  <p>There is equal symbol after left join specific_prices and also didn't track 'Special Price' as character</p>