whereHas is eloquent only, but you can try whereExists instead
https://laravel.com/docs/6.x/queries#where-exists-clauses
If you need to use whereHas you can resolve the model dynamically (notice it is now a string)
$products = resolve('App\Product')- >whereHas('exporters', function (Builder $query) use($exporterId) {
$query->where('exporter_id', '=', 1);
})->get();