File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,11 @@ public function describeColumn(Builder $query)
9595
9696 $ columnName = 'id ' ;
9797 foreach ($ statement ->fetchAll (PDO ::FETCH_ASSOC ) as $ column ) {
98- if ($ column ['Key ' ] === 'PRI ' ) {
99- $ columnName = $ column ['Field ' ];
98+ // convert key case
99+ $ column = Str::convertArrayCase ($ column );
100+
101+ if ($ column ['key ' ] ?? null === 'PRI ' ) {
102+ $ columnName = $ column ['field ' ] ?? null ;
100103 break ;
101104 }
102105 }
Original file line number Diff line number Diff line change @@ -1321,6 +1321,10 @@ public function doesntExist()
13211321 */
13221322 public function toSql ()
13231323 {
1324+ if (!empty ($ this ->query )){
1325+ return $ this ->query ;
1326+ }
1327+
13241328 $ this ->applyBeforeQueryCallbacks ();
13251329
13261330 return $ this ->compile ()->compileSelect ($ this );
You can’t perform that action at this time.
0 commit comments