I am trying to do a query in my Laravel app and I want to use a normal structure for my query. This class either does use Eloquent so I need to find something to do a query
use DB::statement('your raw query here'). Hope this helps.
DB::statement('your raw query here')
use Eloquent Model related to the query you're working on.
and do something like this:
$contactus = ContactUS::select('*') ->whereRaw('id IN (SELECT min(id) FROM users GROUP BY email)') ->orderByDesc('created_at') ->get();