Reputation: 2469
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?
Upvotes: 1
Views: 3511
Reputation: 99
U can use method take()
$result = YourModel::search('query')->take(20)->raw()
or
$result = YourModel::search('query')->take(20)->get()
Upvotes: 5
Reputation: 2037
https://laravel.com/docs/5.5/scout#pagination
Upvotes: 0