Back

Hey Laravel Developers,

Laravel's Query Builder provides us with the paginate() method to build paginations in our application easily.

But did you know that you can also pass the columns you want to select directly to the paginate() method, so you don't need to explicitly use the select() method for column selection?

This can help reduce memory usage if you don't need to use all columns in the table

image

1

259

In response to @aniket

Nice tip!
Does it work with eloquent models?

1

189

  • No matching results...
  • Searching...

/ 1000