@@ -151,7 +151,7 @@ public function handle(): int
151
151
if (!in_array ($ _column ->COLUMN_NAME , ['id ' , 'created_at ' , 'updated_at ' , 'deleted_at ' ])) {
152
152
$ mysqlRepositoryContent .= "\n\t\t\t\t' " . $ _column ->COLUMN_NAME . "' => \$" . $ entityVariableName . "->get " . ucfirst (camel_case ($ _column ->COLUMN_NAME )) . "(), " ;
153
153
} elseif ($ _column ->COLUMN_NAME === 'created_at ' ) {
154
- $ mysqlRepositoryContent .= "\n\t\t\t\t' " . $ _column ->COLUMN_NAME . "' => now()->toDateTimeString( ), " ;
154
+ $ mysqlRepositoryContent .= "\n\t\t\t\t' " . $ _column ->COLUMN_NAME . "' => date('Y-m-d H:i:s' ), " ;
155
155
}
156
156
}
157
157
$ mysqlRepositoryContent .= "\n\t\t\t]); \n" ;
@@ -168,7 +168,7 @@ public function handle(): int
168
168
if (!in_array ($ _column ->COLUMN_NAME , ['id ' , 'created_at ' , 'updated_at ' , 'deleted_at ' ])) {
169
169
$ mysqlRepositoryContent .= "\n\t\t\t\t' " . $ _column ->COLUMN_NAME . "' => \$" . $ entityVariableName . "->get " . ucfirst (camel_case ($ _column ->COLUMN_NAME )) . "(), " ;
170
170
} elseif ($ _column ->COLUMN_NAME === 'updated_at ' ) {
171
- $ mysqlRepositoryContent .= "\n\t\t\t\t' " . $ _column ->COLUMN_NAME . "' => now()->toDateTimeString( ), " ;
171
+ $ mysqlRepositoryContent .= "\n\t\t\t\t' " . $ _column ->COLUMN_NAME . "' => date('Y-m-d H:i:s' ), " ;
172
172
}
173
173
}
174
174
$ mysqlRepositoryContent .= "\n\t\t\t]); \n\t} \n" ;
@@ -180,7 +180,7 @@ public function handle(): int
180
180
$ mysqlRepositoryContent .= "\n\t\treturn \$this->newQuery() " ;
181
181
$ mysqlRepositoryContent .= "\n\t\t\t->where( \$this->primaryKey, \$" . $ entityVariableName . "->getPrimaryKey()) " ;
182
182
$ mysqlRepositoryContent .= "\n\t\t\t->update([ " ;
183
- $ mysqlRepositoryContent .= "\n\t\t\t\t'deleted_at' => now()->toDateTimeString( ), " ;
183
+ $ mysqlRepositoryContent .= "\n\t\t\t\t'deleted_at' => date('Y-m-d H:i:s' ), " ;
184
184
$ mysqlRepositoryContent .= "\n\t\t\t]); \n\t} \n" ;
185
185
186
186
$ mysqlRepositoryContent .= "\n\t/** \n\t * @param $ entityName \$$ entityVariableName \n\t * @return int \n\t */ " ;
0 commit comments