eloquent unique combination

PHP
$table->unique(['taggable_id', 'taggable_type']);
Source

Also in PHP: