/** * Sync up the list of tags in the databse. * */ private function syncTags(Recipe $recipe, array $tags = null) { $recipe->tags()->sync((array) $tags); }