/** * @param Article $article * @param array $tags */ public function syncTags(Article $article, array $tags) { $article->tags()->sync($tags); }