Created
January 26, 2016 18:19
-
-
Save ABM-Dan/e335cd36340024d113fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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