Skip to content

Commit

Permalink
feat: options limit groupby
Browse files Browse the repository at this point in the history
  • Loading branch information
cexll committed May 12, 2022
1 parent 86e9e21 commit 86c2534
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Model/AbstractModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,17 @@ public function optionWhere(array $where, array $options = [])

// 排序
isset($options['orderByRaw']) && $model = $model->orderByRaw($options['orderByRaw']);

// 限制集合
isset($options['skip']) && $model = $model->skip($options['skip']);
isset($options['take']) && $model = $model->take($options['take']);

// SelectRaw
isset($options['selectRaw']) && $model = $model->selectRaw($options['selectRaw']);

// With
isset($options['with']) && $model = $model->with($options['with']);
// Limit
isset($options['limit']) && $model = $model->limit($options['limit']);
// GroupBy
isset($options['groupBy']) && $model = $model->groupBy((array) $options['groupByRaw']);

return $model;
}
Expand Down

0 comments on commit 86c2534

Please sign in to comment.