fixed:数据字典分页
This commit is contained in:
parent
61b9a07d99
commit
93b6f1e2f1
@ -42,7 +42,10 @@ class DataDictionary extends CatchController
|
|||||||
$tables = $tables->where('engine', $engine)->values();
|
$tables = $tables->where('engine', $engine)->values();
|
||||||
}
|
}
|
||||||
|
|
||||||
return CatchResponse::paginate(Paginator::make(array_slice($tables->toArray(), ($request->get('page') ?? 1) - 1,$request->get('limit') ?? 10), $request->get('limit') ?? 10, $request->get('page') ?? 1, $tables->count(), false, []));
|
$page = $request->get('page', 1);
|
||||||
|
$limit = $request->get('limit', 10);
|
||||||
|
|
||||||
|
return CatchResponse::paginate(Paginator::make(array_slice($tables->toArray(), ($page - 1) * $limit, $limit), $limit, $page, $tables->count(), false, []));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user