diff --git a/src/Commands/Actions/FillableTable.php b/src/Commands/Actions/FillableTable.php index 755d3a09..27231193 100644 --- a/src/Commands/Actions/FillableTable.php +++ b/src/Commands/Actions/FillableTable.php @@ -64,7 +64,7 @@ public static function eloquentBuilder(string $modelQualifiedName, string $model $title = Str::of($field)->replace('_', ' ')->ucfirst(); - if (in_array($columnType, ['datetime', 'date'])) { + if (in_array($columnType, ['datetime', 'date', 'timestamp'])) { $columns .= ' Column::make(\'' . $title . '\', \'' . $field . '_formatted\', \'' . $field . '\')' . "\n" . ' ->sortable(),' . "\n\n"; } @@ -157,7 +157,7 @@ public static function queryBuilder(string $databaseTableName, string $stubFile $title = Str::of($field)->replace('_', ' ')->ucfirst(); - if (in_array($columnType, ['datetime', 'date'])) { + if (in_array($columnType, ['datetime', 'date', 'timestamp'])) { $columns .= ' Column::make(\'' . $title . '\', \'' . $field . '_formatted\', \'' . $field . '\')' . "\n" . ' ->sortable(),' . "\n\n"; }