Question:
How to use RAW DB queries with Eloquent in Laravel 7 ?
Solution:
You can use RAW DB queries in various places, for example including havingRaw() function after groupBy().
Example:
Post::groupBy('tags_id')->havingRaw('COUNT(*) > 1')->get();