When the user inputs an offSet value in the query param in the URL, oddly enough, when $take = 20; and $page = 1; - this is when it displays the relevant data, but I'm not sure why numbers like 2, 4, 5, 10 won't work. So what's wrong with my code?
$results = $response->json()['results'];
collect($results);
$page = $request->get('offSet');
$take = 20;
$skip = ($page - 1) * $take;
$paginationResults = collect($results)->skip($skip)->take($take)->all();
dd(paginationResults);