/** * Destroys a field on a source table and all associated entities * * @param string $name * @param string $tableName * @param NodeTypeContract $nodeType */ public function destroyField($name, $tableName, NodeTypeContract $nodeType) { $this->modelBuilder->build($tableName, $nodeType->getFields()); $this->formBuilder->build($tableName, $nodeType->getFields()); $migration = $this->migrationBuilder->getMigrationClassPathByKey($tableName, $name); $this->migrateDown($migration); $this->migrationBuilder->destroyFieldMigrationForTable($name, $tableName); }