We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f0b8c1 commit 2f0fafcCopy full SHA for 2f0fafc
1 file changed
src/Provider/DoctrineProvider.php
@@ -256,15 +256,11 @@ public function findBy($data)
256
$qb->setParameter('contains', '%' . $data['search'] . '%');
257
}
258
259
- if (isset($data['from']) && $data['from'] !== null) {
260
- $qb->andWhere('p.created >= :from');
+ if (isset($data['from']) && $data['from'] !== null && isset($data['to']) && $data['to'] !== null) {
+ $qb->andWhere('p.created BETWEEN :from AND :to');
261
$qb->setParameter('from', $data['from']);
262
- }
263
-
264
- if (isset($data['to']) && $data['to'] !== null) {
265
- $qb->andWhere('p.created <= :to');
266
$qb->setParameter('to', $data['to']);
267
+ }
268
269
return $qb->getQuery();
270
0 commit comments