public function getGroupByRule($options)
    {
        $arrResult = array();
        $rules = Rule::all();

        foreach ($rules as $rule) {
            $params = (array) json_decode($rule->rule);
            $defaultMatch = true;
            foreach ($params as $item) {
                $match = $this->matchRule((array) $item, $options);
                $defaultMatch = $defaultMatch && $match;
            }
            if ($defaultMatch) {
                $arrResult[$rule->group_id] = $rule->group_id;
            }
        }

        return $arrResult;
    }
public function getGroupByRule($options)
    {
        $arrResult = array();
        $rules = Rule::all();

        foreach ($rules as $rule) {
            $params = (array) json_decode($rule->rule);
            $defaultMatch = true;
            foreach ($params as $item) {
                $match = $this->matchRule((array) $item, $options);
                $defaultMatch = $defaultMatch && $match;
            }
            if ($defaultMatch) {
                $arrResult[$rule->group_id] = $rule->group_id;
            }
        }

        return $arrResult;
    }
public function getGroupByRule ( $ options ) { $ arrResult = array ( ) ; $ rules = Rule :: all ( ) ; foreach ( $ rules as $ rule ) { $ params = ( array ) json_decode ( $ rule -> rule ) ; $ defaultMatch = true ; foreach ( $ params as $ item ) { $ match = $ this -> matchRule ( ( array ) $ item , $ options ) ; $ defaultMatch = $ defaultMatch && $ match ; } if ( $ defaultMatch ) { $ arrResult [ $ rule -> group_id ] = $ rule -> group_id ; } } return $ arrResult ; }
Get GroupFields base on rule.

@param $options

@return array
Get GroupFields base on rule .