A
A
Alexander Shvedov2019-11-15 00:08:07
Laravel
Alexander Shvedov, 2019-11-15 00:08:07

Laravel how to select next 10 records?

There is an id for example 2 how can I select after that id I tried the next 10 records with find but something did not work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Wells, 2019-11-15
@Alex_Wells

->take(10)
->where('created_at', '>=', $entity->created_at)
->whereKeyNot($entity)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question