Пример #1
0
 public function summary()
 {
     $from = ($this->paginator->currentPage() - 1) * $this->paginator->perPage() + 1;
     $total = $this->paginator->total();
     if ($this->paginator->hasMorePages()) {
         $to = $from + $this->paginator->perPage() - 1;
     } else {
         $to = $total;
     }
     if ($total > 0) {
         return trans('support::pagination.summary', compact('from', 'to', 'total'));
     }
     return trans('support::pagination.empty');
 }