Added Laurent's tests/model save() method

This commit is contained in:
MrCasual
2015-08-13 09:58:41 -04:00
parent c5f67cb371
commit 5d1b8524ea
3 changed files with 82 additions and 0 deletions

View File

@ -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();
}
}