FOF30\Model\DataModel::whereHas PHP Method

whereHas() public method

SELECT COUNT(*) FROM #__comments AS reltbl WHERE reltbl.user_id = user_id You have to return a WHERE clause for the model's query, e.g. (SELECT COUNT(*) FROM #__comments AS reltbl WHERE reltbl.user_id = user_id) BETWEEN 1 AND 20
public whereHas ( string $relation, callable $callBack, boolean $replace = true )
$relation string The relation to query against
$callBack callable The callback to use for filtering
$replace boolean When true (default) any existing relation filters for the same relation will be replaced
    public function whereHas($relation, $callBack, $replace = true)
    {
        $this->has($relation, 'callback', $callBack, $replace);
        return $this;
    }