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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -