orHaving

Used to match the group method to filter data (usually aggregated conditions) from the results of the grouping.

Use

$builder->groupBy('user_id')->orHaving('times', 3,'>')->get('getTable');

Equivalent to

$builder->groupBy('user_id')->having('times', 3,'>','OR')->get('getTable');

Pass the instructions

Method prototype

function orHaving($havingProp, $havingValue = 'DBNULL', $operator = '=')
  • $havingProp Condition
  • $havingValue value
  • $operator string Operator