mhndev / doctrine-repository by majidphpdeveloper

doctrine repository with simple queries inspired by eloquent
Package Data
Maintainer Username: majidphpdeveloper
Maintainer Contact: (Majid Abdolhosseini)
Package Create Date: 2016-06-16
Package Last Update: 2016-09-25
Home Page:
Language: PHP
License: BSD Style
Last Refreshed: 2020-05-24 15:02:56
Package Statistics
Total Downloads: 34
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 7
Total Watchers: 1
Total Forks: 1
Total Open Issues: 0

Abstract Doctrine Repository

this package is for whom suffer from working with doctrine like me. for whom to like working with Eloquent ORM.

this package's intention is to help you to enjoy working with models and repositories and query the database as easy as possible.

sample usage :

every repository should extend


instead of


so my UserRepository should look like :

namespace UserBundle\Repository;

use mhndev\doctrineRepository\AbstractDoctrineRepository;

 * UserRepository
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.

class UserRepository extends AbstractDoctrineRepository


for example in your action controller you can do the following. consider that here I have my UserRepository as an dependency in my UserController.

      $userArray = $this->repository->findOneById(1, false);
      $userObject = $this->repository->findOneById(1);

      $users = $this->repository->where('name','ab', 'like')->where('enable', 1)->whereIn('status',['public','private'])->all();