A simple helper to generate and display pagination navigation links

Overview

Intro to CHocoCode Paginator

Friendly PHP paginator to paginate everything

This package introduces a different way of pagination handling. You can read more about the internal logic on the given documentation link.

Requirements:

  • PHP >=7.4.

Features:

  • Comming soon

Installation and configuration:

Pretty simple with Composer, run

composer require choco-code/paginator

Configuration & Usage examples

Comming soon

PHP:

 declare(strict_types=1);

use ChocoCode\Paginator\Pagination\PaginationRender;
require_once __DIR__ . '/vendor/autoload.php';

$options = PaginationOptionFactory::create(
        'Suivant',//Next page label
        'Précédent',//Previous page label
        'p'//current page query parameter name
);


$paginator = paginator(
    500,//Total items to paginate
    5,//Items displayed per page
    5,//Page range
    request()->query()->getInt('page', 1), //current page
    $options//Options
);

render($paginator, PaginationRender::BOOTSTRAP_V5)
            ->getRendeContent();// get the output result(navigation links)

Pagination templates engine

That could be used out of the box in $templateEngine key:

  • PaginationRender::BOOTSTRAP_V4 (by default)
  • PaginationRender::BOOTSTRAP_V5

View

Total items : getTotalItems() ?>|
Pages : getPageCount() ?>|
Showing items : getItemsPerPage() ?>|
">
 ?>

<div class="count">
   <div class="d-flex">
       <div class="text-primary">Total items :  $paginator->getTotalItems() ?>|div>
       <div class="text-primary">Pages :  $paginator->getPageCount() ?>|div>
       <div class="text-primary">Showing items :  $paginator->getItemsPerPage() ?>|div> div> div>  <div class="navigation">  render($paginator, PaginationRender::BOOTSTRAP_V5) ->rende(); ?> div>
You might also like...
Sample application to bookmark links, where interface build with Angular.js + Twitter Bootstrap and server powered by PHP with Slim Framework

RESTful Bookmarks PHP Slim TODO: review and update FrontEnd Sample application to bookmark links, where interface build with Angular.js + Twitter Boot

This extension links MediaWiki to phpBB's user table for authentication, and disallows the creation of new accounts in MediaWiki.

This extension links MediaWiki to phpBB's user table for authentication, and disallows the creation of new accounts in MediaWiki. Users must then log in to the wiki with their phpBB account.

Addon for Cockpit CMS - store thumbnails and meta data for video links

VideoLinkField Addon for Cockpit CMS Copy a url from YouTube or Vimeo, click the Button "Find Values", wait a second and in the background starts a se

This repository includes direct links to Genshin Impact updates

GenshinRepository This repository includes direct links to Genshin Impact updates, with this, it allows you to download Genshin Impact updates without

OctoLinker — Links together, what belongs together
OctoLinker — Links together, what belongs together

What is OctoLinker? OctoLinker is a browser extension for GitHub, that turns language-specific statements like include require or import into links. I

This composer plugin is a temporary implementation of using symbolic links to local packages as dependencies to allow a parallel work process

Composer symlinker A Composer plugin to install packages as local symbolic links. This plugin is a temporary implementation of using symbolic links to

The WebLink component manages links between resources

The WebLink component manages links between resources. It is particularly useful to advise clients to preload and prefetch documents through HTTP and HTTP/2 pushes.

A script to retrieve data from a Netatmo weather station and display it in a Mac menu bar.

weathermenu A script to retrieve data from a Netatmo weather station and display it in a Mac menu bar. Intended for use with SwiftBar. Configuration N

Swap Google Fonts Display

Swap Google Fonts Display

Owner
faso-dev
faso-dev
Optional package for Laravel to generate social share links.

Laravel Share Share links exist on almost every page in every project, creating the code for these share links over and over again can be a pain in th

Joren Van Hocht 466 Dec 21, 2022
Magento 2 Megamenu extension is an indispensable component, and plays the role of website navigation to help customers easily categorize and find information

Mageno 2 Mega Menu (Magicmenu) helps you create neat and smart navigation menus to display the main categories on your website.

https://magepow.com 35 Dec 1, 2022
Pagination for PHP.

NB This project is no longer maintained; you may like to use https://github.com/BabDev/Pagerfanta instead. Pagerfanta This project is for PHP 7. If yo

White October 1.6k Jan 3, 2023
Envbar allows you to differentiate between environments by adding a custom colored bar above the top navigation.

Envbar Envbar allows you to differentiate between environments by adding a custom colored bar above the top navigation. This should help backend users

Magenizr 6 Oct 7, 2022
Twig extensions for common navigation widgets for symfony.

Twig Navigation Extension This bundle provides a Twig extensions for common navigation widgets. Installation composer require m2mtech/twig-navigation-

Martin Mandl 1 Feb 23, 2022
Navigation component from Zend Framework

zend-navigation Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-navigation. Zend\Navigation is a component for managing t

Zend Framework 19 Jun 30, 2021
Buy and sell crypto top 100 crypto with our fake currency. Donate to and use our referal links for discounts

PLEASE ENABLE SQLITE3 AND GD OR GD2 IN XAMPP TO RUN THE APP! (SEE HOW_TO_SETUP_XAMPP.gif) ![alt text](https://github.com/Tby23rd/Project1-Cryptosimul

Tabitha Maru 0 Dec 26, 2021
A simple plugin to display a block name that player break or place in popup!

?? • Block Popup Version Status Date 1.0.0 stable-alpha 12/10/2022 ?? • General: Plugin Introduction: This is a simple plugin to add the function to d

HenryDM 3 Nov 2, 2022
Private groups to share messages, photos, videos, links with friends and family.

A truly private space for you and your friends What is Zusam ? Zusam (/tsuˈzam/) is a free and open-source way to self-host private forums for groups

Zusam 104 Dec 20, 2022