Esempio n. 1
0
 /**
  * @param Collection $collection
  * @param $request
  */
 public function __construct(Collection $collection, $request)
 {
     $this->collection = $collection;
     $this->original_collection = $collection;
     $this->columns = array_keys($this->serialize((array) $collection->first()));
     parent::__construct($request);
 }
Esempio n. 2
0
 /**
  * @param mixed $model
  * @param $request
  */
 public function __construct($model, $request)
 {
     $this->query_type = 'eloquent';
     $this->query = $model instanceof Builder ? $model : $model->getQuery();
     $this->columns = $this->query->getQuery()->columns;
     $this->connection = $this->query->getQuery()->getConnection();
     if ($this->isDebugging()) {
         $this->connection->enableQueryLog();
     }
     parent::__construct($request);
 }
 /**
  * @param Builder $builder
  * @param array $request
  */
 public function __construct(Builder $builder, array $request)
 {
     $this->query_type = 'builder';
     $this->query = $builder;
     $this->columns = $this->query->columns;
     $this->connection = $this->query->getConnection();
     if ($this->isDebugging()) {
         $this->connection->enableQueryLog();
     }
     parent::__construct($request);
 }