title: SUM table in laravel 5
body: <p><a href="https://i.stack.imgur.com/d8n0R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d8n0R.png" alt="here my table and what i want to do"></a></p>
  
  <p>SUM data column total ?for example i have two data in column total 01:45 and 02:25 result must be 4:10 . i have already try but my code only sum the hours not with the minute. what should do ?</p>
  
  <p>here my controller. for sum</p>
  
  
  
  
  
  <pre><code>public function getMei()
      {
          $data['users'] = DB::table('lembur_karyawan')
                  -&gt;select('nama', DB::raw('SUM(total) as total_lembur'))
                  -&gt;groupBy('nama')
                  -&gt;havingRaw('SUM(total)')
                  -&gt;first();
  
          return view('mei_user', $data);
      }
  </code></pre>
  
  
  
  <p>and my view : </p>
  
  
  
  
  
  <pre><code>&lt;?php echo $users-&gt;{'total_lembur'} ?&gt;
  </code></pre>