You can use the getCollection() and setCollection() methods on the paginator to interact with the underlying data

You can use the getCollection() and setCollection() methods on the paginator to interact with the underlying data

🔥 #Laravel paginator tip: you can use getCollection and setCollection if you need to do something to the paginator underlying data. Trust me you'll know when you need this.

We're writing a book, you can get it for free here.