src/Jedrzej/Searchable/SearchableTrait.php
protected function applyConstraint(Builder $builder, $field, $constraint, $mode = Constraint::MODE_AND)
    {
        // let model handle the constraint if it has the interceptor
        if (!$this->callInterceptor($builder, $field, $constraint)) {
            $constraint->apply($builder, $field, $mode);
        }
    }
protected function applyConstraint(Builder $builder, $field, $constraint, $mode = Constraint::MODE_AND)
    {
        // let model handle the constraint if it has the interceptor
        if (!$this->callInterceptor($builder, $field, $constraint)) {
            $constraint->apply($builder, $field, $mode);
        }
    }
protected function applyConstraint ( Builder $ builder , $ field , $ constraint , $ mode = Constraint :: MODE_AND ) { // let model handle the constraint if it has the interceptor if ( ! $ this -> callInterceptor ( $ builder , $ field , $ constraint ) ) { $ constraint -> apply ( $ builder , $ field , $ mode ) ; } }
Apply a single constraint - either directly or using model's interceptor

@param Builder    $builder    query builder
@param string     $field      field name
@param Constraint $constraint constraint
@param string     $mode       determines how constraint is applied ("or" or "and")
Apply a single constraint - either directly or using model s interceptor