Exemplo n.º 1
0
 /**
  * Constructor.
  * @param Collection|LengthAwarePaginator $collection
  * @param string $class - optional
  */
 public function __construct($collection, $class = null)
 {
     if ($collection instanceof LengthAwarePaginator) {
         $this->paginator = $collection;
         $this->items = $collection->getCollection();
     } else {
         $this->items = $collection;
     }
     if ($class) {
         $this->setClass($class);
     }
 }