I have a query which gives me list of total counts of different items, as:
$data = DB::table($Table1)
->join($table2,$Table1.'.id','=',$Table2.'.device_key')
->where($Table1.'.created_at', '>', $value)
->select('item', DB::raw('count(*) as total'))
->groupBy('item')
->lists('total', 'item');
now i want to fetch same data with extra condition as >where($Table1.'.status', '=', 'SUCCESS') .
how do i do that ??
Use clone to copy the query object for modifications.