Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. $select_stats = DB::table('visitor')->whereBetween('visit_date', array(date('Y-m-01'), date('Y-m-t')))->get();
  2.  
  3. $get_count = DB::table('visitor')->whereBetween('visit_date', array(date('Y-m-01'), date('Y-m-t')))->count();
  4.  
  5. foreach($select_stats as $statics) {
  6.  
  7. //change our object to an array
  8. $statics = array();
  9. }
  10.  
  11.  
  12. return View::make('admin.home.index')->with('stats', $select_stats)->with('count', $get_count);
  13.  
  14. @foreach($stats as $stat)
  15. ['{{ date("d/m/Y", strtotime($stat->date)) }}', {{ $count }}],
  16. @endforeach
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement