Esempio n. 1
0
 public function save(array $options = array())
 {
     if ($this->status == static::STATUS_PUBLISHED && !$this->published_at) {
         $this->published_at = $this->freshTimestamp();
     }
     return parent::save($options);
 }
Esempio n. 2
0
 public function delete()
 {
     if ($this->exists && $this->isMainComment()) {
         $this->children()->delete();
     }
     parent::delete();
 }