protected function filterByConstraints($constraints) : Builder
	{
		$this->builder->where(function($query) use ($constraints) {
			foreach ($constraints as $filter) {
				if (trim($filter) != '') {
					$query->orWhere('tags', 'like', '%' . $filter . '%');
				}
			}

			return $query;
		});

		return $this->builder;
	}
protected function filterByConstraints($constraints) : Builder
	{
		$this->builder->where(function($query) use ($constraints) {
			foreach ($constraints as $filter) {
				if (trim($filter) != '') {
					$query->orWhere('tags', 'like', '%' . $filter . '%');
				}
			}

			return $query;
		});

		return $this->builder;
	}
protected function filterByConstraints ( $ constraints ) : Builder { $ this -> builder -> where ( function ( $ query ) use ( $ constraints ) { foreach ( $ constraints as $ filter ) { if ( trim ( $ filter ) != '' ) { $ query -> orWhere ( 'tags' , 'like' , '%' . $ filter . '%' ) ; } } return $ query ; } ) ; return $ this -> builder ; }
Filter the query by the given constraints.

@param  array $constraints

@return Builder
Filter the query by the given constraints .