src/Validation/Laravel/Validator.php
protected function getExtraConditions(array $segments) {
        $extra = [];

        $count = count($segments);

        $operators = [
            '=', '<', '>', '<=', '>=', '<>', '!='
        ];

        // if any of the operators are in the segments
        if(!!array_intersect($operators, $segments)) {
            for ($i = 0; $i < $count; $i = $i + 3) {
                $extra[$segments[$i]] = [$segments[$i + 1], $segments[$i + 2]];
            }
        } else {
            for ($i = 0; $i < $count; $i = $i + 2) {
                $extra[$segments[$i]] = $segments[$i + 1];
            }
        }

        return $extra;
    }
protected function getExtraConditions(array $segments) {
        $extra = [];

        $count = count($segments);

        $operators = [
            '=', '<', '>', '<=', '>=', '<>', '!='
        ];

        // if any of the operators are in the segments
        if(!!array_intersect($operators, $segments)) {
            for ($i = 0; $i < $count; $i = $i + 3) {
                $extra[$segments[$i]] = [$segments[$i + 1], $segments[$i + 2]];
            }
        } else {
            for ($i = 0; $i < $count; $i = $i + 2) {
                $extra[$segments[$i]] = $segments[$i + 1];
            }
        }

        return $extra;
    }
Get the extra conditions for a unique / exists rule.

@param  array  $segments
@return array