Exemplo n.º 1
0
 public function paginate($page = 20)
 {
     return Visit::orderBy('created_at', 'DESC')->paginate($page);
 }
Exemplo n.º 2
0
 public function getVisitsOfYear($d, $perPage = 20)
 {
     $d = preg_replace('/\\//i', '-', $d);
     $d = explode('-', $d);
     return Visit::whereYear('created_at', '=', $d[2])->paginate($perPage);
 }