dotman/laravel-covid
Composer 安装命令:
composer create-project dotman/laravel-covid
包简介
Covid-19 - A simple Laravel package for reporting covid-19 cases across the world.
README 文档
README
A laravel package for fetching covid-19 data across the world
Installation
You can install the package using composer
$ composer require dotman/laravel-covid
Usage
You can use it in your controller like so:
<?php namespace App\Http\Controllers; use Dotman\Covid\Covid; /** * Gets all the affected countries * @return array */ Covid::getCountries() /** * Gets cases per country * @param string country Slug from the all countries results * @return array */ Covid::getCasesPerCountry($slug) /** * Gets total cases per country * @param string country Slug from the all countries results * @return array */ Covid::getTotalCasesPerCountry($slug) /** * Get cases per country by passing the country slug and status * @param string country Slug and status could either be confirmed, recovered, deaths. * @return array */ Covid::getCasesPerCountryPerStatus($slug, $status) /** * Get total cases per country by passing the country slug and status * @param string country Slug and status could either be confirmed, recovered, deaths. * @return array */ Covid::getTotalCasesPerCountryPerStatus($slug, $status) /** * Summary of new and total cases per country * @param string state or state code * @return array */ Covid::getSummary()
Appreciation
Huge thanks go to the Kyle Redelinghuys crew for providing a fluent and awesome API
Contributing
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
How can I thank you?
Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter.
Don't forget to follow me on twitter!
Thanks! Kasim Ridwan.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-05