Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

maxdiable's avatar

yajra/laravel-oci8 pagination

hi, have any example for pagination in "yajra/laravel-oci8" ?

br Max

0 likes
10 replies
jlrdw's avatar

Well an older version you need these techniques:

https://blogs.oracle.com/oraclemagazine/on-top-n-and-pagination-queries

https://stackoverflow.com/questions/241622/paging-with-oracle

In version 12c on they have the newer offset fetch like sql server added:

OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY

But why not look this up in the Oracle documentation?

Edit, there is also information here:

https://www.php.net/manual/en/function.oci-fetch-array.php

Go there and search for the word offset.....

sr57's avatar

Don't understand your question, I don't use -oci8, but do you mean that Yajra default pagination does not work?

It works well (for me) and I think it should not depend of a driver ...

maxdiable's avatar

I use yajra and in the documentation I not found any examples for new pagination for oracle 12c For now I have developed my functions for use "OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY"

Be Max

jlrdw's avatar

I use yajra and in the documentation ........

Yajra uses the php Oracle functions.

maxdiable's avatar

I read the documentation, but I not found nothing about pagination 😔

jlrdw's avatar

I read the documentation, but I not found nothing about pagination

OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY is pagination. If 5 per page:

  • Page 1 is offset 0
  • Page 2 is offset 5
  • Page 3 is offset 10
  • etc
sr57's avatar

I have developed my functions for use "OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY"

No need to do server side pagination, Yajra does it well by default, I tested it till 100.000 records ...

maxdiable's avatar

Hello, thank you for the reply, but i am using the plugin "yajra / laravel-oci8" for communication with oracle, just wanted to know if anyone has already used the latest version of this plugin with pagination.

Br Max

Please or to participate in this conversation.