bosnadev / repository

Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.
https://bosnadev.com
823 stars 233 forks source link

CriteriaInterface never used #104

Closed kamov closed 5 years ago

kamov commented 5 years ago

I would like to know for what it's used the CriteriaInterface?

In the article here: https://bosnadev.com/2015/03/07/using-repository-pattern-in-laravel-5/ your Criteria for film implement CriteriaInterface, however here in repository you mention to:

Your criteria class MUST extend the abstract Bosnadev\Repositories\Criteria\Criteria class.

My doubts are also that for each class Criteria we can apply only 1 method. Can we have 1 single Criteria class for different methods?

elceka commented 5 years ago

CriteriaInterface is implemented by Repository abstract class, because this interface contain methods intended for Repository class, not for Criteria class.