1
votes

I have a little problem. How do I add the following to my repository?

repository by pastebin.com

I would also like to add the following.

$date = new \DateTime('midnight');
$query->matching(
$query->greaterThanOrEqual('date', $date->format('Y-m-d H:i:s'))
);

Separate from each other it works. Thanks

1
What are you currently trying to achieve? All training records that are after the upcoming midnight? - Thomas Löffler
In my repository, I'm going to give records by selected category. Now you want to see only records where the date is in the future. - Stigi

1 Answers

1
votes

It works!

...
$query->matching(
$query->logicalAnd(
$query -> logicalAnd($constraints),
$query->greaterThanOrEqual('date', $date->format('Y-m-d H:i:s'))
)
);
...