I want to add a couple of fields to the SQL table:
And make them fill in automatically when saving, not manually. The date_create field would save the current time when creating a record (INSERT when saving in pure sql). And the date_update field would save each record update (UPDATE when saving in pure sql)
in the CrudController file for my Entity class I started like this:
public function configureFields(string $pageName): iterable
{
/* some code */
yield Field\DateTimeField::new('DATE_CREATE', 'Date created')
->setDisabled();
yield Field\DateTimeField::new('DATE_UPDATE', 'Date updated')
->setDisabled();
}
Please tell me how to programmatically fill these fields under the specified conditions. Thanks in advance