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