for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* UserRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class UserRepository extends EntityRepository
{
public function getCountUsers()
return $this->createQueryBuilder('u')
->select('count(u.id) as countUsers')
->getQuery()
->getSingleResult();
}