Beispiel #1
0
 /**
  * Passing $from, $to, $total to view
  * @return mixed
  */
 protected function getViewData()
 {
     $paginator = $this->grid->getConfig()->getDataProvider()->getPaginator();
     $from = $paginator->getFrom();
     $to = $paginator->getTo();
     $total = $paginator->getTotal();
     return parent::getViewData() + compact('from', 'to', 'total');
 }
Beispiel #2
-1
 /**
  * Passing $from, $to, $total to view
  * @return mixed
  */
 protected function getViewData()
 {
     $paginator = $this->grid->getConfig()->getDataProvider()->getPaginator();
     # Laravel 4
     if (method_exists($paginator, 'getFrom')) {
         $from = $paginator->getFrom();
         $to = $paginator->getTo();
         $total = $paginator->getTotal();
         # Laravel 5
     } else {
         $from = $paginator->firstItem();
         $to = $paginator->lastItem();
         $total = $paginator->total();
     }
     return parent::getViewData() + compact('from', 'to', 'total');
 }
Beispiel #3
-1
 protected function getViewData()
 {
     return parent::getViewData() + ['column' => $this->column];
 }