public function scopeDynamicFilter(Builder $query, string $filter_id, array $values): Builder 	{ 		return $query->whereHas('productFilters', function ($query) use ($values, $filter_id) { 			$whereIn = [];  			foreach ($values as $operand => $value) { 				if ($value == null) { 					continue; 				}  				if (is_int($operand)) { 					$whereIn[] = $value;  					continue; 				}  				if ($operand == 'like') { 					$value = '%' . preg_replace('/\s+/', '%', $value) . '%'; 				}  				$query = $query->where('value', $operand, $value) 					->orWhereHas('translations', function ($query) use ($operand, $value) { 						$query->where('value', $operand, $value); 					}); 			}  			$query->when(!empty($whereIn), function ($query) use ($whereIn) { 				$query->whereIn('value', $whereIn) 					->orWhereHas('translations', function ($query) use ($whereIn) { 						$query->whereIn('value', $whereIn); 					}); 			}) 			->whereHas('categoryFilter', function ($query) use ($filter_id) { 				$query->whereHas('filter', function ($query) use ($filter_id) { 					$query->searchable()->where('id', $filter_id); 				}); 			}); 		}); 	}