Get Daily Data using Laravel Query Builder

Query Builder

$result = DB::table('orders')
    ->select(DB::raw("sum(total) as total, DATE_FORMAT(created_at,'%Y-%m-%d') as date_label"))
    ->where('status', 1)
    ->get();