public function getLimitedUrlsUsingFrom($from) { $count = Url::count(); if ($count <= $from) { echo "No more Data found"; return; } $limit = $count - $from; // the limit $urls = Url::skip($from)->take($limit)->get(); echo $urls->toJson(); }