We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45bbb2b commit c316473Copy full SHA for c316473
src/QueriesJsonColumns.php
@@ -69,6 +69,10 @@ protected function toCast(Field $field): string
69
default => null,
70
};
71
72
+ if ($cast === 'datetime' && str_contains(get_class($this->builder->getConnection()->getQueryGrammar()), 'PostgresGrammar')) {
73
+ $cast = 'timestamp';
74
+ }
75
+
76
// Date Ranges are dealt with a little bit differently.
77
if ($field->type() === 'date' && $field->get('mode') === 'range') {
78
$cast = "range_{$cast}";
0 commit comments