Hey @zizi_ove this seems like the solution your looking for. It shows examples for a 'Laravel-ish' way and a nice simple query builder way.
https://stackoverflow.com/questions/24555697/check-if-belongstomany-relation-exists-laravel
The second example of using query builder seems very straight forward. So you would create a route and controller, pass the tag_id and taggable_id as request parameters and then use them in the where clause.