1. Go to this page and download the library: Download pramod/api-consumer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
//add second param on your via method
//for static uri eg, canvasenx.com.np/users
return Api::consume('covid19api')
->via('summary', true)
->toCollection();
//for dynamic uri you must add your uri payload with value as
return Api::consume('covid19api')
->via('countryDayOneRoute', [
'country'=>'nepal'
])
->toCollection();