findoneby

Solutions on MaxInterview for findoneby by the best coders in the world

showing results for - "findoneby"
Leon
17 Mar 2020
11<?php
2// A single user by its nickname
3$user = $em->getRepository('MyProject\Domain\User')->findOneBy(array('nickname' => 'romanb'));
4
5// A single user by its nickname (__call magic)
6$user = $em->getRepository('MyProject\Domain\User')->findOneByNickname('romanb');
similar questions
laravel find by