예제 #1
0
 /**
  * Return a new Collection with only the first x items.
  *
  * @param int $limit
  *
  * @return Collection
  */
 public function take($limit)
 {
     if ($this->data === null && is_string($this->sql) === false) {
         if ($this->sql->limit === false || $this->sql->limit >= $limit) {
             return new self($this->sql->limit($limit), $this->dbLink);
         }
     }
     return parent::take($limit);
 }