code: protected function parseRule($rule)
      {
          if (isset($rule['condition'])) {
              return $this->buildWhereFromQuery($rule);
          }
          if (!isset($rule['field']) || !isset($rule['operator'])) {
              return false;
          }
          if (!isset($rule['value'])) {
              $rule['value'] = null;
          }
          $modelClass = $this->modelClass;
          $dummyModel = new $modelClass();
          if ($dummyModel->hasAttribute($rule['field'])) {
              return $this->buildLogic($rule['field'], $rule['operator'], $rule['value']);
          } else {
              \d($rule);
              exit;
          }
      }
docs: [[@doctodo method_description:parseRule]].
  
  @param [[@doctodo param_type:rule]] $rule [[@doctodo param_description:rule]]
  
  @return [[@doctodo return_type:parseRule]] [[@doctodo return_description:parseRule]]