We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7f15c39 + edf9c05 commit c102fc3Copy full SHA for c102fc3
src/Services/ModelService.php
@@ -63,8 +63,8 @@ protected function getAllFields()
63
$columns = [];
64
65
//@TODO cache this
66
- foreach (DB::connection($this->connectionName)->select("SHOW COLUMNS FROM $this->tableName") as $column) {
67
- $columns[$column->Field] = null;
+ foreach (DB::connection($this->connectionName)->getSchemaBuilder()->getColumnListing($this->tableName) as $column) {
+ $columns[$column] = null;
68
}
69
70
return $columns;
0 commit comments