yurykabanov / laravel-repository
This package is abandoned and no longer maintained.
No replacement package was suggested.
Laravel 5.x repository and query objects boilerplate
v0.1.3
2016-11-24 03:24 UTC
Requires
- php: >=5.6
- illuminate/console: ^5.1
- illuminate/contracts: ^5.1
- illuminate/database: ^5.1
- illuminate/filesystem: ^5.1
- illuminate/support: ^5.1
Requires (Dev)
- phpunit/phpunit: ^5.6
This package is not auto-updated.
Last update: 2018-12-13 20:27:39 UTC
README
Requirements
PHP >= 5.6 or HHVM
Installation
- Run
composer require yurykabanov/laravel-repository
to install this package. - Add service provider
YuryKabanov\Repository\Providers\RepositoryServiceProvider::class
.
Usage
Generate repositories and queryable criteria
Package provides make:repository
and make:criteria
commands to generate repositories and criteria.
# Create StuffRepoitory for given Stuff aggregation root php artisan make:repository "Repositories\StuffRepository" "App\Models\Stuff"
# Create SearchLikeCriteria php artisan make:criteria "Criteria\SearchLikeCriteria"
Combine criteria
Multiple criteria could be combined using AndCriteria
and OrCriteria
.