Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $users = User::whereHas('posts', function($query) { $query->where('great_post', true); })->get();
- $postsQuery = Posts::where('great_post', true);
- $users = User::where('posts', $postsQuery)->get(); // not working
Add Comment
Please, Sign In to add comment