morphMany(Article::class, 'product'); } public function Producer() { return $this->belongsTo(Producer::class); } public function tags() { return $this->morphToMany(Tag::class, 'taggable'); } public function scopeByProducer($query, $producer_id) { return $query->where('producer_id', $producer_id); } }