title: Laravel Sync Call to undefined method Illuminate\Database\Query\Builder
body: <p>I try to get several options and several specifications for each of my products.</p>
  
  <p>In order to get several values instead of one I had to make third tables named <code>product_suboptions</code> and <code>product_subspecifications</code> where it gets id of product and id of <code>options</code> + <code>subspecifications</code></p>
  
  <p>This is my create method:</p>
  
  <pre><code>$options = Option::all();
  $suboptions = Suboption::all();
  $specifications = Specification::all();
  $subspecifications = Subspecification::all();
  return view('admin.products.create', compact('options', 'suboptions', 'specifications', 'subspecifications'));
  </code></pre>
  
  <p>This is my store method:</p>
  
  <pre><code>public function store(Request $request)
      {
  //.........
  
  $product-&gt;save();
  $product-&gt;suboptions()-&gt;sync($request-&gt;suboptions, false);
  $product-&gt;subspecifications()-&gt;sync($request-&gt;subspecifications, false);
  
  return ......//
  }
  </code></pre>
  
  <p>This relations in my models:</p>
  
  <p><code>Product</code></p>
  
  <pre><code>public function option(){
       return $this-&gt;belongsToMany(Option::class);
    }
    public function suboption(){
       return $this-&gt;belongsToMany(Suboption::class);
    }
    public function specification(){
       return $this-&gt;belongsToMany(Specification::class);
    }
    public function subspecification(){
       return $this-&gt;belongsToMany(Subspecification::class);
    }
  </code></pre>
  
  <p><code>Option</code></p>
  
  <pre><code>public function products(){
       return $this-&gt;belongsToMany(Product::class);
    }
  </code></pre>
  
  <p><code>Suboption</code></p>
  
  <pre><code>public function products(){
       return $this-&gt;belongsToMany(Product::class);
    }
  </code></pre>
  
  <p><code>Specification</code></p>
  
  <pre><code>public function products(){
       return $this-&gt;belongsToMany(Product::class);
    }
  </code></pre>
  
  <p><code>Subspecification</code></p>
  
  <pre><code>public function products(){
       return $this-&gt;belongsToMany(Product::class);
    }
  </code></pre>
  
  <p>Now the problem is when i save product it returns this error</p>
  
  <blockquote>
    <p>BadMethodCallException
    Call to undefined method Illuminate\Database\Query\Builder::suboptions()</p>
  </blockquote>
  
  <p>and only save my product but nothing in <code>product_suboptions</code> and <code>product_subspecifications</code> tables.</p>
  
  <p>any idea?</p>