PHP code example of eduard44 / foundation-pagination

1. Go to this page and download the library: Download eduard44/foundation-pagination library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

eduard44 / foundation-pagination example snippets


use Chromabits\Pagination\FoundationPresenter;

// To be set in a service provider or wherever
Paginator::presenter(function($paginator)
{
    return new FoundationPresenter($paginator);
});

use App\Models\Post;
use Chromabits\Pagination\FoundationPresenter;

$paginator = Post::query()->paginate();

$html = $paginator->render(new FoundationPresenter($paginator));