Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. <?php
  2.  
  3. // where has relation and key - value
  4. // OR
  5. // doesnt have a relation
  6. ->where(function($query){
  7. $query->whereHas('report', function($q){$q->where('accepted', '<=', '0');})
  8. ->orWhereHas('report', function($q){$q;}, '<', 1);
  9. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement