PHP code example of blasttech / laravel-paginate-plus
1. Go to this page and download the library: Download blasttech/laravel-paginate-plus 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/ */
blasttech / laravel-paginate-plus example snippets
use Blasttech\PaginatePlus\PaginatePlus;
use Blasttech\PaginatePlus\PaginatePlusTrait;
class MyModel extends Eloquent implements PaginatePlus
{
use PaginatePlusTrait;
public function getCustomers()
{
return Customer::addSelect(DB::raw('REPLACE(customer_name, 'Pty Ltd', '') AS customer'))
->groupBy('customer')
->paginatePlus(25);
}
...
}