DiverseYouthNightSchool/application/admin/command/Crud/stubs/mixins/datetime.stub

6 lines
226 B
Plaintext
Raw Normal View History

2024-11-04 10:49:10 +08:00
public function {%methodName%}($value, $data)
{
$value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}