change pagination class

This commit is contained in:
Ibnu Maksum
2023-10-24 12:27:30 +07:00
parent e99108a34a
commit 37f72d881e
11 changed files with 62 additions and 57 deletions

View File

@ -22,10 +22,10 @@ switch ($action) {
run_hook('view_list_bandwidth'); #HOOK
$name = _post('name');
if ($name != ''){
$paginator = Paginator::bootstrap('tbl_bandwidth','name_bw','%'.$name.'%');
$paginator = Paginator::build(ORM::for_table('tbl_bandwidth'), ['name_bw' => '%' . $name . '%'], $name);
$d = ORM::for_table('tbl_bandwidth')->where_like('name_bw','%'.$name.'%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
}else{
$paginator = Paginator::bootstrap('tbl_bandwidth');
$paginator = Paginator::build(ORM::for_table('tbl_bandwidth'));
$d = ORM::for_table('tbl_bandwidth')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
}