Repository/PageRepository.php
public function findBySlug($path)
	{
		$qb = $this->createQueryBuilder('p');
		$qb instanceof QueryBuilder;
	
		$qb->add('where', $qb->expr()->like('p.slug', $qb->expr()->lower(':searched_term')))
			->setParameter('searched_term', $path);
	
		return $qb->getQuery()->getResult();
	}
public function findBySlug($path)
	{
		$qb = $this->createQueryBuilder('p');
		$qb instanceof QueryBuilder;
	
		$qb->add('where', $qb->expr()->like('p.slug', $qb->expr()->lower(':searched_term')))
			->setParameter('searched_term', $path);
	
		return $qb->getQuery()->getResult();
	}
public function findBySlug ( $ path ) { $ qb = $ this -> createQueryBuilder ( 'p' ) ; $ qb instanceof QueryBuilder ; $ qb -> add ( 'where' , $ qb -> expr ( ) -> like ( 'p.slug' , $ qb -> expr ( ) -> lower ( ':searched_term' ) ) ) -> setParameter ( 'searched_term' , $ path ) ; return $ qb -> getQuery ( ) -> getResult ( ) ; }
Find page by slug

@param string $path
Find page by slug