Laravel Implementation of Repository Pattern (forked from LazyElePHPant/repository)
Laravel package to facilitate repository design pattern implementation across multiple projects.
This package is a forked version of LazyElePHPant/repository, with the changes provided by @calvinchiulele in the pull request #2
The reason behind this fork is that it looks like @LazyElePHPant ignored or didn't have time to handle the pull request and i wanted to use this in a project of mine.
Contributing to this is welcome, but this is mainly for may own personal use. Since i didn't want to clash with lazy's namespacing, this fork's namespace has been changed.
Credits for this package (at least for now) are entirely @LazyElePHPant and @calvinchiulele.
composer require niladam/repository
To generate a repository class without a specific model simply run the following command:
php artisan make:repository NameRepository
To generate a repository class for a specific model you may specify by defining the --model
:
php artisan make:repository NameRepository --model=User