承接 alexkratky/paginationx 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alexkratky/paginationx

Composer 安装命令:

composer require alexkratky/paginationx

包简介

Class to split data into several pages.

README 文档

README

Pagination is class that splits the data to segments and browse between these segments. Before usage SQL pagination, need to setup DB connection (AlexKratky\db::connect()).

Installation

composer require alexkratky/paginationx

The basic usage:

require 'vendor/autoload.php';
use AlexKratky\Pagination;

//example data
$data = array(0,1,2,3,4,5,6,7,8,9);
//enter data and how many elements are on page (3). By default 10.
$pagination = new Pagination($data, 3);
$d = $pagination->getData(); // [0,1,2]
$pagination->currentPage(); // 1
$pagination->totalPages(); // 4 (floor(10/3)+1)
$pagination->previousPage(); // false; because the first page is the lowest one
$pagination->nextPage(); // 2

The current page is set by AlexKratky\Route::getValue("{PAGE}"); so just use in your routes {PAGE} parameter. Or it could be done by get parameter ?page= ($_GET["page"]).

InfinityScrolling

The InfinityScrolling is script, that will automatically load next page using AJAX when the user hits the bottom of page. Everything you need to do is calling this static method Pagination::infinityScroll() inside the DOM element, where the data will be loaded. Also, for this you need route CURRENT_URI_WHERE_IS_INFINITY_SCROLL_USED/load/{PAGE} which will serve the data.

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固