I need to sum values using Laravel db::table and get the result between two dates, example:
Date: 05/30/2016 Sold: 1 Date: 05/31/2016 Sold: 2
So result should be Sold: 3
This is a search result given by a filter by date, i have done something like this with no results:
DB::table('sales')
->where('date',$date_from)
->where('date',$date_to)
->selectRaw('sum(price)')
->selectRaw('id')
->groupBy('id')
->get();