예제 #1
0
 public function paginate($page = 20)
 {
     return Visit::orderBy('created_at', 'DESC')->paginate($page);
 }
예제 #2
0
파일: Stats.php 프로젝트: athakim/stats
 public function getVisitsOfYear($d, $perPage = 20)
 {
     $d = preg_replace('/\\//i', '-', $d);
     $d = explode('-', $d);
     return Visit::whereYear('created_at', '=', $d[2])->paginate($perPage);
 }