skip() public static method

Alias to set the "offset" value of the query.
public static skip ( integer $value ) : Builder | static
$value integer
return Illuminate\Database\Query\Builder | static
コード例 #1
0
ファイル: ParseBaseController.php プロジェクト: malimu/baas
 /**
  * @param $limit
  * @param $skip
  */
 public function limit($limit, $skip = null)
 {
     if (!is_null($limit) and is_numeric($limit)) {
         $this->object = $this->object->take($limit);
     } else {
         $this->object = $this->object->take(100);
     }
     if (!is_null($skip) and is_numeric($skip)) {
         $this->object = $this->object->skip($skip);
     }
 }
コード例 #2
0
ファイル: Datatables.php プロジェクト: testoodoo/OoodooSiteUp
 /**
  * Datatables paging
  *
  * @return null
  */
 private function doPaging()
 {
     if (!is_null($this->input['start']) && !is_null($this->input['length']) && $this->input['length'] != -1) {
         $this->query->skip($this->input['start'])->take((int) $this->input['length'] > 0 ? $this->input['length'] : 10);
     }
 }