Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ABM-Dan/e335cd36340024d113fa to your computer and use it in GitHub Desktop.
Save ABM-Dan/e335cd36340024d113fa to your computer and use it in GitHub Desktop.
<?php
namespace MyBundle\Repository;
use MyBundle\Entity\Customer;
use Doctrine\ORM\EntityRepository;
class RecentSearchRepository extends EntityRepository
{
public function findRecentByUser(Customer $user)
{
$query = $this->getEntityManager()
->createQueryBuilder()
->select('s')
->from('MyBundle:RecentSearch','s')
->where('s.customer = :user')
->setParameter(':user', $user);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment