title: Laravel Method sync does not exist
body: <p>Post Model</p>
  
  <pre><code>&lt;?php
  
  namespace App\Model\User;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Post extends Model
  {
     public function tags(){
       return $this-&gt;belongsToMany('App\Model\User\Tag','post__tags', 'post_id', 'tag_id');
    }
  
    public function categories() {
       return $this-&gt;belongsToMany('App\Model\User\Category','category__posts','post_id', 'category_id');
    }
  }
  </code></pre>
  
  <p>Category Model</p>
  
  <pre><code>&lt;?php
  
  namespace App\Model\User;
  use Illuminate\Database\Eloquent\Model;
  
  class Category extends Model
  {
     public function posts(){
        return $this-&gt;belongsToMany('App\Model\User\Category','category__posts', 'post_id', 'category_id');
     }
  
  }
  </code></pre>
  
  <p>Tag Model</p>
  
  <pre><code>&lt;?php
  
  namespace App\Model\User;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Tag extends Model
  {
     public function posts() {
         return $this-&gt;belongsToMany('App\Model\User\Post','post__tags','post_id','tag_id');
     }
  }
  </code></pre>
  
  <p>PostController.php</p>
  
  <pre><code>public funcion store()
  {
  // do validation here
     try{
        $post = new Post;
        $post-&gt;title = $request-&gt;title;
        $post-&gt;subtitle  =  $request-&gt;subtitle;
        $post-&gt;slug  =  $request-&gt;slug;
        $post-&gt;body  =  $request-&gt;body;           
        $post-&gt;status  =  1;                   
        $post-&gt;save();     // This works correct 
        $post-&gt;tags-&gt;sync($request-&gt;tags); // Not working
        $post-&gt;categories-&gt;sync($request-&gt;categories);  // Not working
     }
     catch(\Exception $e){ 
        return redirect(route('post.index'))-&gt;with('message', 'Error Adding Post into system!'.$e-&gt;getMessage()); // getting Message "Method sync does not exist. "
      }      
  }
  </code></pre>