published_date -> publishedDate
This commit is contained in:
@@ -18,7 +18,7 @@ class Note
|
|||||||
private ?string $content = null;
|
private ?string $content = null;
|
||||||
|
|
||||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||||
private ?\DateTime $published_date = null;
|
private ?\DateTime $publishedDate = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
#[ORM\Column(length: 255)]
|
||||||
private ?string $slug = null;
|
private ?string $slug = null;
|
||||||
@@ -42,12 +42,12 @@ class Note
|
|||||||
|
|
||||||
public function getPublishedDate(): ?\DateTime
|
public function getPublishedDate(): ?\DateTime
|
||||||
{
|
{
|
||||||
return $this->published_date;
|
return $this->publishedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setPublishedDate(\DateTime $published_date): static
|
public function setPublishedDate(\DateTime $publishedDate): static
|
||||||
{
|
{
|
||||||
$this->published_date = $published_date;
|
$this->publishedDate = $publishedDate;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ class NoteRepository extends ServiceEntityRepository
|
|||||||
$max->add(DateInterval::createFromDateString('1 day'));
|
$max->add(DateInterval::createFromDateString('1 day'));
|
||||||
|
|
||||||
$wherePublishedOnDate = $this->createQueryBuilder('n')
|
$wherePublishedOnDate = $this->createQueryBuilder('n')
|
||||||
->andWhere('n.published_date >= :min')
|
->andWhere('n.publishedDate >= :min')
|
||||||
->andWhere('n.published_date < :max')
|
->andWhere('n.publishedDate < :max')
|
||||||
->setParameter('min', $min)
|
->setParameter('min', $min)
|
||||||
->setParameter('max', $max)
|
->setParameter('max', $max)
|
||||||
->getQuery()
|
->getQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user