|
|
@ -46,7 +46,7 @@ class Revision extends BaseModel |
|
|
|
$selects = $withId ? ["data->>'_id' as _id"] : []; |
|
|
|
$selects = $withId ? ["data->>'_id' as _id"] : []; |
|
|
|
|
|
|
|
|
|
|
|
foreach ($columns as $col) { |
|
|
|
foreach ($columns as $col) { |
|
|
|
$selects[] = "data->>'$col->id' as " . ($named ? $col->name : $col->id); |
|
|
|
$selects[] = "data->>'$col->id' as \"" . ($named ? $col->name : $col->id)."\""; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $this->rows()->select([])->selectRaw(implode(', ', $selects)); |
|
|
|
return $this->rows()->select([])->selectRaw(implode(', ', $selects)); |
|
|
|