appends(request()->query()) code example Example: laravel pagination keep query string $result->appends(request()->query())->links()