Trying to check if a unique index exists on a table when preparing a migration, how can it be achieved?
Schema::table('persons', function (Blueprint $table) {
if ($table->hasIndex('persons_body_unique')) {
$table->dropUnique('persons_body_unique');
}
})
Something that looks like the above. (apparently, hasIndex() doesn't exist)