private function condition($query, $field, $comparison, $input, $type)
    {
        // Convert date formats
        if ($type == 'date') {
            $field = $this->convertDateField($field);
            $input = Carbon::createFromFormat(__('decoy::form.date.format'), $input)
                ->format('Y-m-d');
        }

        // Apply the where
        switch ($comparison) {

            // NULL safe equals and not equals
			case '=':
			case '!=':
				return $this->applyEquality($comparison, $query, $field, $input);

            // Not Like
            case '!%*%':
                $comparison = substr($comparison, 1);
                $input = str_replace('*', $input, $comparison);
                return $query->where($field, 'NOT LIKE', $input);

            // Like
            case '*%':
            case '%*':
            case '%*%':
                $input = str_replace('*', $input, $comparison);
                return $query->where($field, 'LIKE', $input);

            // Defaults
            default:
                return $query->where($field, $comparison, $input);
        }
    }