public function getLimitedUrls($from, $to) { if ($from > $to) { echo "Invalid Query"; return; } $urls = Url::take($to)->skip($from)->get(); echo $urls->toJson(); }