Added Laurent's tests/model save() method
This commit is contained in:
@ -8,4 +8,12 @@ class Model extends \Sudzy\ValidModel {
|
||||
$customValidators = new CustomValidator();
|
||||
parent::__construct($customValidators->init());
|
||||
}
|
||||
|
||||
function save() {
|
||||
if ($this->created_at === null) {
|
||||
$this->created_at = date("Y-m-d H:i:s");
|
||||
}
|
||||
parent::save();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user