getAttributes(); foreach ($attrs as $field => $val) { if (str_ends_with($field, '_last')) { unset($model->{$field}); } } } //修改日期时间格式 protected function serializeDate(\DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } }