Esempio n. 1
0
 public static function readLog($deviceId, $page)
 {
     Paginator::currentPageResolver(function () use($page) {
         return $page;
     });
     return CallLog::where('device_id', $deviceId)->orderBy('call_time', 'DESC')->simplePaginate(config('custom.item_per_page'))->all();
 }
Esempio n. 2
0
 public function postLastCallLog()
 {
     $log = CallLog::where('device_id', $this->device->id)->orderBy('call_time', 'DESC')->first();
     if (empty($log)) {
         return array();
     }
     return $log;
 }