Can you please format your code blocks correctly?
May 15, 2021
7
Level 1
I am unable to get the data after calling an API
class States extends Controller
{
public function lists() {
$data = Http::get('https://cdn-api.co-vin.in/api/v2/admin/location/states')->json();
dd( $data);
}
}
I am using the API and trying to get the data in my view but its sending null value. Can anyone tell me where i am doing wrong?? Also, I am using
use Illuminate\Support\Facades\Http;
but still its saying null value. Thank You.
Please or to participate in this conversation.