public function save() { $expire = $this->expire->getTimestamp(); $after = $this->alert_after_date->getTimestamp(); $before = $this->alert_before_date->getTimestamp(); $notifyii = new ModelNotifyii(); $notifyii->expire = date('Y-m-d', $expire); $notifyii->alert_after_date = date('Y-m-d', $after); $notifyii->alert_before_date = date('Y-m-d', $before); $notifyii->content = $this->message; $notifyii->role = $this->role; $notifyii->link = $this->link; $notifyii->save(); }