public function apply($constraints) : Builder
	{
		if ($constraints && $this->type == 'product_categories') {
			return $this->builder->whereIn('category_id', $constraints);
		}

		if ($constraints && is_array($constraints)) {
			return $this->filterByConstraints($constraints);
		}

		return $this->builder;
	}
public function apply($constraints) : Builder
	{
		if ($constraints && $this->type == 'product_categories') {
			return $this->builder->whereIn('category_id', $constraints);
		}

		if ($constraints && is_array($constraints)) {
			return $this->filterByConstraints($constraints);
		}

		return $this->builder;
	}
public function apply ( $ constraints ) : Builder { if ( $ constraints && $ this -> type == 'product_categories' ) { return $ this -> builder -> whereIn ( 'category_id' , $ constraints ) ; } if ( $ constraints && is_array ( $ constraints ) ) { return $ this -> filterByConstraints ( $ constraints ) ; } return $ this -> builder ; }
Suggest products based on the given tags.

@param  array $tags

@return Builder
Suggest products based on the given tags .