Answer the question
In order to leave comments, you need to log in
How to select last 10 records in laravel without changing sorting?
Hello. I have 100 records in the database.
I need to select the last 10 entries but without changing the sorting
i.e. I set limit(10)->orderBy("id", "desc")
But the records will be displayed like this 100,99,98,97...
I need them to be displayed the other way around from 90,91,92..
How to execute such a query and without iterating in the loop change sorting
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question