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