protected function applyCriteria(Builder $builder, array $criteria)
    {
        foreach ($criteria as $criterion) {
            $criterion->apply($builder);
        }
    }
protected function applyCriteria(Builder $builder, array $criteria)
    {
        foreach ($criteria as $criterion) {
            $criterion->apply($builder);
        }
    }
protected function applyCriteria ( Builder $ builder , array $ criteria ) { foreach ( $ criteria as $ criterion ) { $ criterion -> apply ( $ builder ) ; } }
Applies criteria to query

@param Builder $builder query builder
@param Criterion[] $criteria sorting criteria
Applies criteria to query