In general, I encountered such a problem in yii2, I receive data from vk in this way:

$client = new Client([ 'baseUrl' => 'https://api.vk.com/method/newsfeed.search', 'responseConfig' => [ 'format' => Client::FORMAT_JSON ], ]); $response = $client->createRequest()->setMethod('GET')->setData([ 'q' => $q, 'extended' => 1, 'count' => 12, 'start_from' => $offset, 'v' => 5.95, 'access_token' => 'my_token' ])->send(); 

Well, here I want to bind pagination to this code, I wanted to bind the standard one, but for it you need to know the total number of records, and you won’t find out until you send the request. Please help.

    0