prrwebcreate / weather
由 openweathermap.org 驱动的 Laravel 天气包
dev-master
2022-01-22 20:40 UTC
Requires
- illuminate/support: ~7|~8
Requires (Dev)
- orchestra/testbench: ~5|~6
- phpunit/phpunit: ~9.0
This package is auto-updated.
Last update: 2024-09-23 02:34:38 UTC
README
安装
通过 Composer
$ composer require prrwebcreate/weather
确保您正在使用 Bootstrap 5。
用法
由 https://openweathermap.org/ 驱动的简单天气小部件。安装包并配置默认值(config/weather.php)
api_key = 从 https://openweathermap.org/ 获取的您的 API 密钥 time_interval = 刷新间隔时间
天气信息保存在名为 'weather' 的数据库中。
要使用包,您需要在视图中调用 "renderWeather($name = city name, ex. 'London',$lang = language, ex. 'en','pl')" 辅助函数;renderWeather('London','en')
变更日志
有关最近更改的更多信息,请参阅 changelog。
测试
$ composer test
贡献
有关详细信息,请参阅 contributing.md,包括待办事项列表。
安全
如果您发现任何安全相关的问题,请通过作者的电子邮件而不是使用问题跟踪器。
鸣谢
许可证
许可证。请参阅 许可证文件 以获取更多信息。