Andrea Lagaccia
Results
2
comments of
Andrea Lagaccia
+1 It would be useful
``` $term_slug = 'variable'; $taxonomy = ProductType::whereHas('term', function($q) use ($term_slug) { $q->where('slug', $term_slug); })->first(); $youProductModel->productTypes()->syncWithoutDetaching($taxonomy->term_taxonomy_id); ```