Laravel ( WhereRaw HavingRaw OrderByRaw And SelectRaw ) Let’s get began shortly We begin with WhereRaw $merchandise = DB::desk(‘merchandise’) ->whereRaw(‘worth > IF(state = “TX”, ?, 100)’, [200]) ->get(); Enter fullscreen mode Exit fullscreen mode havingRaw Product::groupBy(‘product_id’)->havingRaw(‘COUNT(*) > 1’)->get(); Enter fullscreen mode Exit fullscreen mode orderByRaw Person::the place(‘created_at’, ‘>’, ‘2022-01-01’) ->orderByRaw(‘(updated_at – created_at) desc’) ->get(); Enter…

Read More