Code Monkey home page Code Monkey logo

page's Introduction

pagination

数组分页,可定制样式,内置3种样式,稍微修改一下可使用与所有的情形下的数组分页

Installation

Pagination is available on Packagist.Just add this line to your composer.json file:

"lipichang/pagination": "dev-master"

or run

composer require lipichang/pagination:dev-master

Example

use Lipichang\Pagination;
$pagination = new Pagination($totalPage,['style' => 1,'is_style' => true,'is_follow' => true,'simple'=>false,'allCounts'=>true,'nowAllPage'=>true,'toPage'=>true],['title' => 'shoes']);

//分页样式的渲染
$page = $pagination->render();

Explanation

参数 类型 说明
totalPage int 总页数
style int 分页样式,可选值1,2,3
is_style boolean 是否使用默认样式true是 false否 默认true
is_follow boolean 是否允许搜索引擎跟踪 true 是 false 否 默认true
simple boolean true:简单的分页样式,false:复杂的分页样式
allCounts boolean 显示总页数
nowAllPage boolean 显示现在的页码
toPage boolean 跳转页码的功能
query array 分页其他查询参数

Show

simple模式

simple模式

style = 1,2,3

Image1 text

Image1 text

Image1 text

allCount,nowAllPage,toPage模式

Image1 text

page's People

Contributors

lipichang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.