public function beforeCreate() { $this->created_at = date('Y-m-d H:i:s'); $this->updated_at = date('Y-m-d H:i:s'); }