0

I am using scout for my api so can't use pagination , where as the scout only provides the pagination only so are there any ways to use offset and limit in laravel scout?

ujwal dhakal
  • 2,289
  • 2
  • 30
  • 50

2 Answers2

3

U can use method take()

$result = YourModel::search('query')->take(20)->raw()

or

$result = YourModel::search('query')->take(20)->get()
ArtSur
  • 59
  • 1
  • 8
0

Pagination is built into scout...

https://laravel.com/docs/5.5/scout#pagination

Artistan
  • 1,982
  • 22
  • 33