Skip to content

Instantly share code, notes, and snippets.

@notflip
Last active March 31, 2021 18:12
Show Gist options
  • Save notflip/1b2189239bc1cb936bbf2a0d5e592611 to your computer and use it in GitHub Desktop.
Save notflip/1b2189239bc1cb936bbf2a0d5e592611 to your computer and use it in GitHub Desktop.
Laravel WhereHasNot
public function scopeUnClaimed($query)
{
return $query->whereHas('claims',function($q) {
$q->where('dentist_id', $user->dentist->id);
}, '<', 1);
}
@MacaRamos
Copy link

Thank you !!

@emedinagenium
Copy link

Many thanks!!!

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