yayasanvitka / covid19-module
1.0.3
2020-03-20 15:45 UTC
Requires
- php: >=7.2
- joshbrw/laravel-module-installer: ^0.1.4
- laravel/framework: 5.8.*
- nwidart/laravel-modules: ^5.1
This package is auto-updated.
Last update: 2024-11-21 02:49:30 UTC
README
Introduction
yayasanvitka/covid19-module
is a Laravel package which was created to easily publish and consume the API for live information about Novel Coronavirus-19.
This module is based on API from javieraviles/covidAPI.
Documentation
Requirement
This module is created as laravel-modules, and require the following:
- Laravel > 5.8.*
- laravel-modules >= 5.1
Installation & Setup
composer require yayasanvitka/covid19-module
Web Route
- /api/covid19: Global Data
- /api/covid19/countries: List of countries
- /api/covid19/countries/{COUNTRY}: Data per Country
Facade Methods
Covid::fetch()
Fetch data from endpointCovid::get()
Get The Data. Returns \Illuminate\Support\Collection. Can be chained with country() method.Covid::country()
Get the country data.Covid::total()->cases
Get total data (Global) for casesCovid::total()->todayCases
Get total data (Global) for todayCasesCovid::total()->todayDeath
Get total data (Global) for todayDeathCovid::total()->recovered
Get total data (Global) for recoveredCovid::total()->deaths
Get total data (Global) for deathsCovid::total()->active
Get total data (Global) for activeCovid::total()->critical
Get total data (Global) for criticalCovid::total()->casesPerOneMillion
Get total data (Global) for casesPerOneMillion
Facade Methods
php artisan covid19-update
Run this to update the database
License
MIT License 2020, IT Yayasan Vitka. Based on API from javieraviles, the data may not be used for commercial purposes.