Skip to content

Conversation

@amir9480
Copy link
Contributor

@amir9480 amir9480 commented May 3, 2021

This PR adds havingNull and havingNotNull support to the query builder class.
The syntax is exactly like whereNull and whereNotNull.

Example code before this change:

User::select(...)
    ->join(...)
    ->groupBy(...)
    ->havingRaw('users.sample_column is null')
    ->get();

Same code after this change:

User::select(...)
    ->join(...)
    ->groupBy(...)
    ->havingNull('sample_column')
    ->get();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants