回帖:$schema = \DB::getDoctrineSchemaManager();
$columns = $schema->listTableColumns('table_name'); //get table columns
foreach ($table->getColumns() as $column) { //run loop
$column->getName(). - .$column->getType()->getName(); //here you can define your inputes
}
$model = new ExampleModel();
$model->getConnection()->getSchemaBuilder()->getColumnListing($model->getTable());
public function getColumnsNames() {
return (array) $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable());
}

