title: Laravel Sync error
body: <p>I am running the following code, </p>
  
  <pre><code>if( $organisation-&gt;save() ) {
  
          if(isset($members)) {
              $organisation-&gt;users()-&gt;sync($members);
          }
  
          if(isset($teams)) {
              $organisation-&gt;teams()-&gt;sync($teams);
          }
  
          if(isset($teams)) {
              $organisation-&gt;clients()-&gt;sync($clients);
          }
  
          if(isset($projects)) {
              $organisation-&gt;projects()-&gt;sync($projects);
          }
  
          $organisation-&gt;load('users');
          $organisation-&gt;load('teams');
          $organisation-&gt;load('clients');
          $organisation-&gt;load('projects');
  
          return Response::make($organisation, 200);
  
      }
  </code></pre>
  
  <p>I am am getting the following error when I try and sync <code>$projects</code>,</p>
  
  <p>the array looks like this,</p>
  
  <p><code>[0] =&gt; 6</code> so a very very simple array. My relationships in the models look like this, </p>
  
  <p><strong>Organisation</strong></p>
  
  <pre><code>public function projects()
  {
      return $this-&gt;hasMany('Project');
  }
  </code></pre>
  
  <p><strong>Projects</strong></p>
  
  <pre><code>public function organisations()
  {
      return $this-&gt;belongsToMany('Organisation', 'organisation_id');
  }
  </code></pre>
  
  <p>As you can see I an organisation can have many projects. I cannot see a reason why I would be getting the following error, </p>
  
  <blockquote>
    <p>Call to undefined method Illuminate\Database\Query\Builder::sync()</p>
  </blockquote>