title: How can indexes be checked if they exist in a Laravel migration?
body: <p>Trying to check if a unique index exists on a table when preparing a migration, how can it be achieved?</p>
  
  <pre><code>Schema::table('persons', function (Blueprint $table) {
      if ($table-&gt;hasIndex('persons_body_unique')) {
          $table-&gt;dropUnique('persons_body_unique');
      }
  })
  </code></pre>
  
  <p>Something that looks like the above. (apparently, hasIndex() doesn't exist)</p>