I want to find if a $work (string) exist in Works (array), how can I write the request?
public function findByProject($project, $work)
{
return $this->createQueryBuilder('p')
->andWhere('p.project_type = :project')
->andWhere('p.works = :work')
->setParameter('project', $project)
->setParameter('work', $work)
->orderBy('p.id', 'ASC')
//->setMaxResults(10)
->getQuery()
->getResult()
;
}
public function findByProject($project, $work)