示例#1
0
 /**
  * Excluir campo.
  *
  * @param  string|array $columns
  *
  * @return \Illuminate\Support\Fluent
  */
 public function dropColumn($columns)
 {
     $columns = is_array($columns) ? $columns : (array) func_get_args();
     // Verificar se deve excluir constrain dos campos lookups antes
     foreach ($columns as $column) {
         if (ForeignKey::isAssociation($column)) {
             parent::dropForeign(ForeignKey::makeName($this->table, $column));
         }
     }
     return parent::dropColumn($columns);
 }