add order item stuff
This commit is contained in:
parent
68b4096bb0
commit
814dc4a41b
11 changed files with 175 additions and 113 deletions
|
@ -23,4 +23,19 @@ final class FoodOrderRepository extends ServiceEntityRepository
|
|||
$this->getEntityManager()
|
||||
->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FoodOrder[]
|
||||
*/
|
||||
public function findLatestEntries(int $limit = 10): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('alias');
|
||||
|
||||
$qb->orderBy('alias.createdAt', 'DESC');
|
||||
$qb->setMaxResults($limit);
|
||||
|
||||
$query = $qb->getQuery();
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue