We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5858bf commit cdbbd85Copy full SHA for cdbbd85
src/Coders/Model/Model.php
@@ -235,8 +235,14 @@ protected function parseColumn(Fluent $column)
235
// TODO: Check type cast is OK
236
$cast = $column->type;
237
238
+ // Due to some casting problems when converting null to Carbon
239
+ // we are going to treat Soft Deletes field as string.
240
+ if ($column->name == $this->getDeletedAtField()) {
241
+ $cast = 'string';
242
+ }
243
+
244
// Track dates
- if ($cast == 'date' && $column->name != $this->getDeletedAtField()) {
245
+ if ($cast == 'date') {
246
$this->dates[] = $column->name;
247
}
248
// Track attribute casts
0 commit comments