Example #1
0
 function __construct($builder)
 {
     parent::__construct();
     if ($builder instanceof Relation) {
         $this->builder = $builder->getBaseQuery();
         $this->originalBuilder = clone $builder->getBaseQuery();
     } else {
         $this->builder = $builder;
         $this->originalBuilder = clone $builder;
     }
 }
Example #2
0
 /**
  * @param Collection $collection
  */
 function __construct(Collection $collection)
 {
     parent::__construct();
     $this->collection = $collection;
     $this->workingCollection = $collection;
 }