eror distinct pagination laravel


Biasanya error paging terjadi ketika ada query yang memakai distinct pad laravel, disini saya pake laravel 5.8

tambahkan ini
$columns

$total = $this->getCountForPagination($columns);
pada /var/www/html/lpse/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
ubntuk querynya

$dt = $sql->distinct(‘namatabel’)->paginate(5,[‘namatabel’]);

semoga berguna 🙂
referensi :

tinggalkan pesan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google

You are commenting using your Google account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d blogger menyukai ini: