Skip to content

Commit 12379ee

Browse files
committed
Fill "updated_at" in "create" Functions in Mysql Repositories
1 parent 6cfb6d8 commit 12379ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Commands/MakeMySqlRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function handle(): int
130130
$createFunctionStub = substr_replace($createFunctionStub,
131131
$this->writeGetterFunction($getterStub, $_column->COLUMN_NAME),
132132
-95, 0);
133-
} elseif ($_column->COLUMN_NAME === 'created_at') {
133+
} elseif (in_array($_column->COLUMN_NAME, ['created_at', 'updated_at'], true)) {
134134
$createFunctionStub = substr_replace($createFunctionStub,
135135
$this->writeGetterFunction($timeFieldStub, $_column->COLUMN_NAME),
136136
-95, 0);

0 commit comments

Comments
 (0)