Laravel Quick Tip – get previous / next records.

For one of my projects I needed to get an ID of the previous and next record in the DB. Let’s say we are logged in as an admin and we are on this user’s page and we want to see next/previous user’s id. The following Eloquent code makes it easy to do that: // […]

Read More