php - doing monthly and yearly sales laravel 4 from a sales table recorded in timestamps -
php - doing monthly and yearly sales laravel 4 from a sales table recorded in timestamps -
i have been looking ideas on how retrieve monthly sales , yearly sales sales table, , list them in months jan, feb,.... , yearly 2015, 2016....in tables sales records entered hourly using timestamps. want implement using laravel 4
any help appreciated
i tried daily sales
$dates= db::table('sales') ->groupby('hr') ->whereraw("date(created_at) = curdate()") ->select(db::raw('hour(created_at) hr'),db::raw('sum(sale) salez'), db::raw('date_format(created_at,"%b %d %y %h:00 %p") hrtime')) ->get(); php mysql laravel
Comments
Post a Comment