withWhereHas method
whereHas + with with the same constraint.
Implementation
ModelQuery<T> withWhereHas(
String relation, [
RelationConstraint? constraint,
]) {
whereHas(relation, constraint);
_with[relation] = constraint;
return this;
}