PHP code example of wnikk / smart-pagination
1. Go to this page and download the library: Download wnikk/smart-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/ */
wnikk / smart-pagination example snippets
$posts = \App\Models\Post::orderByDesc('created_at')->smartPaginate(10, reverse: true);
$posts->withPath('/post', '/page-{page}.html');
bash
php artisan vendor:publish --tag=smart-pagination-config
bash
php artisan vendor:publish --tag=smart-pagination-views