kregel / nova-weather-cards
Laravel Nova 卡
0.0.1
2018-11-20 02:20 UTC
Requires
- php: >=7.1.0
- guzzlehttp/guzzle: ^6.3
- predis/predis: ^1.1
This package is auto-updated.
Last update: 2024-09-07 06:36:21 UTC
README
基于 Redis 的存储,并由 darksky.net 驱动
你只需要从 darksky 获取开发者令牌,并使用 predis 进行键持久化。
安装
您可以通过 composer 将此包安装到使用 Nova 的 Laravel 应用中
composer require predis/predis
composer require kregel/nova-weather-cards
接下来,您必须将工具注册到 Nova 中。这通常在 NovaServiceProvider
的 cards
方法中完成。
用法
// in app/Providers/NovaServiceProvider.php // ... public function cards() { return [ // ... (new \Kregel\NovaWeatherCards\Weather)->withMeta([ 'name' => 'San Francisco', 'coords' => [ 37.7749, 122.4194, ] ]), // If you don't define coordinates it will default to your location. (new \Kregel\NovaWeatherCards\Weather)->withMeta([ 'name' => 'Current location', ]), // Or you could forego all configuration. (which will default to no title, and your current location) new \Kregel\NovaWeatherCards\Weather, ]; }
贡献
有关详细信息,请参阅 CONTRIBUTING
安全性
如果您发现任何与安全相关的问题,请通过电子邮件 github@austinkregel.com 反馈,而不是使用问题跟踪器。
鸣谢
许可证
MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件
在 Beerpay 上支持
嘿兄弟!帮助我喝杯 🍻!