79633558

Date: 2025-05-22 10:43:09
Score: 1
Natty:
Report link

```

// src/Repository/AppointmentRepository.php

public function findTodayForInstructor($instructor): array

{

$today = new \\DateTimeImmutable('today');

return $this-\>createQueryBuilder('a')

    -\>where('a.instructor = :instructor')

    -\>andWhere('a.date = :today')

    -\>setParameter('instructor', $instructor)

    -\>setParameter('today', $today-\>format('Y-m-d'))

    -\>orderBy('a.startTime', 'ASC')

    -\>getQuery()

    -\>getResult();

}

```

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: John Doe