Passing null as value will remove the header.
public function setLastModified(?\DateTimeInterface $date): static
public function setLastModified(?\DateTimeInterface $date): static
{
if (null === $date) {
$this->headers->remove('Last-Modified');
return $this;
}
$date = \DateTimeImmutable::createFromInterface($date);
$date = $date->setTimezone(new \DateTimeZone('UTC'));
$this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s').' GMT');
return $this;
}
Powered by Froala Editor