Beispiel #1
0
 /**
  * Indicate that the given index should be dropped.
  *
  * @param  string|array  $columns
  * @return Blueprint
  */
 public function dropIndex($columns = null)
 {
     $columns = $this->fluent($columns);
     // Columns are passed as a default array.
     if (is_array($columns) && is_int(key($columns))) {
         // Transform the columns to the required array format.
         $transform = [];
         foreach ($columns as $column) {
             $transform[$column] = $column . '_1';
         }
         $columns = $transform;
     }
     foreach ($columns as $column) {
         $this->collection->dropIndex($column);
     }
     return $this;
 }