title: Laravel Eloquent Eager Loading assumes incorrect pivot table column name
body: <p>I have two tables in Laravel 5.4. Orders and Product which are joined by a many-to-many relationship </p>
  
  <p>I'm trying to fetch all the orders together with the associated products like so:</p>
  
  <pre><code>$orders = Orders::with('products')-&gt;get();
  </code></pre>
  
  <p>My Order Model has this set up as </p>
  
  <pre><code>public function products()
  {
      return $this-&gt;belongsToMany('App\Product')
          -&gt;withPivot('qty')
          -&gt;withTimeStamps();
  }
  </code></pre>
  
  <p>When I output the log I get the following error message:</p>
  
  <pre><code>Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'order_product.order_order_id' in 'field list' (SQL: select `products`.*, `order_product`.`order_order_id` as `pivot_order_order_id`, `order_product`.`product_product_id` as `pivot_product_product_id`, `order_product`.`qty` as `pivot_qty`, `order_product`.`created_at` as `pivot_created_at`, `order_product`.`updated_at` as `pivot_updated_at` from `products` inner join `order_product` on `products`.`product_id` = `order_product`.`product_product_id` where `order_product`.`order_order_id` in (66, 67, 70, 72, 73, 74) and `products`.`deleted_at` is null) in /home/vagrant/Projects/vcc-backoffice/vendor/laravel/framework/src/Illuminate/Database/Connection.php:647
  </code></pre>
  
  <p>The issue is that Laravel is looking for a table in the Pivot called "<strong>order_order_id</strong>" which doesn't exist. I haven't declared the column to be called that.  My pivot table columns are called "<strong>order_id</strong>" and "<strong>product_id</strong>"</p>
  
  <p>I don't know how Laravel assumes the pivot table names. Is there a way to specifically declare the column names in the pivot? Or have I made a mistake in my naming conventions? </p>