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.
1 parent 7f15c39 commit edf9c05Copy full SHA for edf9c05
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