I'm using Laravel 5.5, And I want to know how can we get highest value of each column in one query ?
Is that possible or we should query one by one ?
I tried below code.
DB::table('family')->max('children')->max('salary');
When I tried just DB::table('family')->max('children')
, It works well. But when I try DB::table('family')->max('children')->max('salary')
, I get below error
Call to a member function max() on string