|
@@ -14,6 +14,7 @@ class CmsContentTemplateRepository {
|
|
|
//模板列表
|
|
|
public function index($request)
|
|
|
{
|
|
|
+ $perPage = isset($request['per_page']) ? $request['per_page'] : env('PER_PAGE');
|
|
|
$where = [];
|
|
|
if(isset($request['id'])){
|
|
|
$where[] = ['id', '=', $request['id']];
|
|
@@ -22,7 +23,7 @@ class CmsContentTemplateRepository {
|
|
|
$where[] = ['is_open',$request['is_open']];
|
|
|
}
|
|
|
|
|
|
- return $this->cmsContentTemplate->where($where)->orderBy('id', 'asc')->paginate(20);
|
|
|
+ return $this->cmsContentTemplate->where($where)->orderBy('id', 'asc')->paginate($perPage);
|
|
|
|
|
|
}
|
|
|
|