Something like this?:
...->select(DB::raw('SUM(column) as sum_colum')->where('sum_column', ...)
Although in your 'where' statement, you will have to use another raw query I'm afraid.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community