PHPackages                             rakibdevs/covid19-laravel-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rakibdevs/covid19-laravel-api

ActiveLibrary[API Development](/categories/api)

rakibdevs/covid19-laravel-api
=============================

Laravel package to connect https://rapidapi.com/api-sports/api/ to get covid-19 statistics data for any location on the globe immediately

v1.2(4y ago)191073MITPHPPHP ^7.0|^8.0

Since Jan 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/RakibDevs/covid19-laravel-api)[ Packagist](https://packagist.org/packages/rakibdevs/covid19-laravel-api)[ RSS](/packages/rakibdevs-covid19-laravel-api/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Laravel [Covid 19](https://rapidapi.com/api-sports/api/covid-193) API
---------------------------------------------------------------------

[](#laravel-covid-19-api)

[![Packagist](https://camo.githubusercontent.com/236bc4816e4bf774b8a2240386ef0a93c0809a2d0ba0d99241f09b36a2512a90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616b6962646576732f636f76696431392d6c61726176656c2d617069)](https://camo.githubusercontent.com/236bc4816e4bf774b8a2240386ef0a93c0809a2d0ba0d99241f09b36a2512a90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616b6962646576732f636f76696431392d6c61726176656c2d617069)[![GitHub stars](https://camo.githubusercontent.com/981353f8c8526943ba07045d936b8b7cf99233e073871550b2bc5d1d68399833/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f72616b6962646576732f636f76696431392d6c61726176656c2d617069)](https://github.com/rakibdevs/covid19-laravel-api/stargazers)[![GitHub forks](https://camo.githubusercontent.com/83b3d0e85c8829b361a5d8558407c354d99a4a90fd31d619e95b55f0f6af2971/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f72616b6962646576732f636f76696431392d6c61726176656c2d617069)](https://github.com/rakibdevs/covid19-laravel-api/network)[![GitHub issues](https://camo.githubusercontent.com/182f4d92bb99304c4c190d01907de3517f22c6b4bbafdd2a63f8783297d9bfc8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f72616b6962646576732f636f76696431392d6c61726176656c2d617069)](https://github.com/rakibdevs/covid19-laravel-api/issues)[![GitHub license](https://camo.githubusercontent.com/69f06258f18fd87ae524b077bdd24b17273cbe0ff6a66cba67e6924e66f54a41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f72616b6962646576732f636f76696431392d6c61726176656c2d617069)](https://github.com/rakibdevs/covid19-laravel-api/blob/master/LICENSE)[![Twitter](https://camo.githubusercontent.com/7610af4d15e8f662d85159dc0363a7c103c9d931842316d738db4043f2cf6731/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c3f7374796c653d736f6369616c2675726c3d68747470732533412532462532467061636b61676973742e6f72672532467061636b6167657325324672616b696264657673253246636f76696431392d6c61726176656c2d617069)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fpackagist.org%2Fpackages%2Frakibdevs%2Fcovid19-laravel-api)

Laravel Covid-19 API (covid19-laravel-api) is a Laravel package to connect Open Covid-19 APIs (  ) and access free API services easily.

Supported APIs
--------------

[](#supported-apis)

APIsGet data by[Statistics](https://covid-193.p.rapidapi.com/statistics)By country \[optional\][Available Countries](https://covid-193.p.rapidapi.com/countries)[History](https://covid-193.p.rapidapi.com/history)By country \[Required\], date \[optional\]Installation
------------

[](#installation)

Install the package through [Composer](http://getcomposer.org). On the command line:

```
composer require rakibdevs/covid19-laravel-api

```

Configuration
-------------

[](#configuration)

If Laravel &gt; 7, no need to add provider

Add the following to your `providers` array in `config/app.php`:

```
'providers' => [
    // ...
    RakibDevs\Covid19\Covid19ServiceProvider::class,
],
'aliases' => [
    //...
    'Covid19' => RakibDevs\Covid19\Covid19::class,
];
```

Publish the required package configuration file using the artisan command:

```
	$ php artisan vendor:publish

```

Edit the `config/openCovid19.php` file and modify the `api_key` value with your Open Covid19 Map api key.

Get an api key [here](https://rapidapi.com/api-sports/api/covid-193/pricing)

```
	return [
	    'api_key' 	        => ''
	];
```

Usage
-----

[](#usage)

Here you can see some example of just how simple this package is to use.

```
use RakibDevs\Covid19\Covid19;
use RakibDevs\Covid19\Facades\Covid;

// Get current Covid19 by city name

// 1. The traditional way
$wt   = new Covid19();
$info = $wt->getCountries('ban');

// 2. The Facade way
$info = Covid::getCountries('ban');
```

### Output

[](#output)

```
{
    "get":"countries"
    "parameters":{
        "search":"ban"
    }
    "errors":[]
    "results":3
    "response":[
        0:"Albania"
        1:"Bangladesh"
        2:"Lebanon"
    ]
}

```

### [Available Countries](https://rapidapi.com/api-sports/api/covid-193)

[](#available-countries)

Get all current statistics for all countries

```
// By country name or portion of string
$info = $wt->getCountries('ban');

// Get all countries
$info = $wt->getAllCountries();
```

#### Output:

[](#output-1)

```
{
    "get":"countries"
    "parameters":[]
    "errors":[]
    "results":225
    "response":[
        0:"Afghanistan"
        1:"Albania"
        ........
    ]
}

```

### [Statistics](https://api-sports.io/documentation/covid-19/v1#tag/Statistics)

[](#statistics)

This endpoint reflects the current status of the spread of the coronavirus in all countries.

It is possible to filter per country to retrieve its current status.

For the current situation in the world use `All`

```
// By country name
$info = $wt->getStatistics();

// Get statistics
$info = $wt->getAllStatistics();
```

#### Output:

[](#output-2)

```
{
    "get":"statistics"
    "parameters":{
        "country":"bangladesh"
    }
    "errors":[]
    "results":1
    "response":[
        0:{
            "continent":"Asia"
            "country":"Bangladesh"
            "population":165545725
            "cases":{
            "new":"+692"
            "active":47562
            "critical":NULL
            "recovered":466064
            "1M_pop":"3149"
            "total":521382
        }
        "deaths":{
            "new":"+22"
            "1M_pop":"47"
            "total":7756
        }
        "tests":{
            "1M_pop":"20202"
            "total":3344399
        }
        "day":"2021-01-10"
        "time":"2021-01-10T05:30:06+00:00"
        }
    ]
}

```

### [History](https://rapidapi.com/api-sports/api/covid-193forecast5)

[](#history)

This dunction refers to the entire history of statistics for a country.

For global results, use .

```
// By country name [required] and date
$info = $wt->getHistory('bangladesh', '2020-01-01');
```

### Output

[](#output-3)

```
{
    "get":"history"
    "parameters":{
        "country":"Bangladesh"
        "day":"2020-06-02"
    }
    "errors":[]
    "results":1
    "response":[
        0:{
            "continent":"Asia"
            "country":"Bangladesh"
            "population":164551275
            "cases":{
                "new":"+2381"
                "active":38265
    ....

```

### Worldwide Summary

[](#worldwide-summary)

Get Covid-19 worldwide summary till current date.

```
$info = $wt->getSummary();
```

### Output

[](#output-4)

```
{
    "cases_new": 777635
    "cases_active": 67908362
    "cases_critical": 325531
    "cases_recovered": 193258167
    "cases_total": 270304615
    "deaths_new": 14668
    "deaths_total": 5805634
    "tests_total": 1282221510
    "time": "2020-03-25T06:00:07+00:00"
}

```

License
-------

[](#license)

Laravel Open Covid19 API is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~105 days

Total

3

Last Release

1722d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d789cf937c914cb8a2ce0c513840be4c4558007bb36433509496587d1989fdb?d=identicon)[rakibdevs](/maintainers/rakibdevs)

---

Top Contributors

[![rakibdevs](https://avatars.githubusercontent.com/u/44586913?v=4)](https://github.com/rakibdevs "rakibdevs (10 commits)")[![OussamaMater](https://avatars.githubusercontent.com/u/57406233?v=4)](https://github.com/OussamaMater "OussamaMater (3 commits)")[![markoman78](https://avatars.githubusercontent.com/u/45894988?v=4)](https://github.com/markoman78 "markoman78 (1 commits)")

---

Tags

apilaravelcovid-19coronacovid

### Embed Badge

![Health badge](/badges/rakibdevs-covid19-laravel-api/health.svg)

```
[![Health](https://phpackages.com/badges/rakibdevs-covid19-laravel-api/health.svg)](https://phpackages.com/packages/rakibdevs-covid19-laravel-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
