marcusmyers/laravel-dashboard-accuweather-tile
Composer 安装命令:
composer require marcusmyers/laravel-dashboard-accuweather-tile
包简介
An AccuWeather Tile for Laravel Dashboard
README 文档
README
Much like Spatie's laravel-dashboard-time-weather-tile, but uses AccuWeather.
This tile can be used on the Laravel Dashboard.
Installation
You can install the package via composer:
composer require marcusmyers/laravel-dashboard-accuweather-tile
Usage
In the dashboard config file, you must add this configuration in the tiles key.
Sign up at https://developer.accuweather.com/ to obtain ACCUWEAHTER_API_KEY and you can find your location key by searching for you city at https://www.accuweather.com. The resulting url should have your location key, i.e. https://www.accuweather.com/en/us/chicago/60608/weather-forecast/348308, the Chicago location key is 348308. AccuWeather only allows you 50 API request a day for a free account.
The data can be displayed as either Imperial (Farenheit) or Metric (Celsis). This will affect information displayed on the daily tile and forecast tiles.
It is also possible to change the date format of the tiles. Valid formats are m/d or d/m.
// in config/dashboard.php return [ // ... 'tiles' => [ 'accuweather' => [ 'location_key' => '12345', 'api_key' => env('ACCUWEATHER_API_KEY'), 'system' => 'Metric', 'date_format' => 'd/m', ] ], ];
In app\Console\Kernel.php you should schedule the MarcusMyers\AccuWeatherTile\Commands\FetchAccuWeatherCurrentConditionsCommand to run every hour.
If you want to use the forecast you can optionally schedule the MarcusMyers\AccuWeatherTile\Commands\FetchAccuWeatherFiveDayForecastCommand to run daily.
// in app/console/Kernel.php protected function schedule(Schedule $schedule) { // ... $schedule->command(MarcusMyers\AccuWeatherTile\Commands\FetchAccuWeatherCurrentConditionsCommand::class)->hourly(); $schedule->command(MarcusMyers\AccuWeatherTile\Commands\FetchAccuWeatherFiveDayForecastCommand::class)->daily(); }
In your dashboard view you can use the livewire:accuweather-current-conditions-tile component or the livewire:accuweather-five-day-forecast-tile.
<x-dashboard> <livewire:accuweather-current-conditions-tile position="e1:e4" /> <livewire:accuweather-five-day-forecast-tile position="a14:d16" /> </x-dashboard>
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
marcusmyers/laravel-dashboard-accuweather-tile 适用场景与选型建议
marcusmyers/laravel-dashboard-accuweather-tile 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 391 次下载、GitHub Stars 达 7, 最近一次更新时间为 2020 年 05 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「marcusmyers」 「laravel-dashboard-accuweather-tile」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 marcusmyers/laravel-dashboard-accuweather-tile 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 marcusmyers/laravel-dashboard-accuweather-tile 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 marcusmyers/laravel-dashboard-accuweather-tile 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
统计信息
- 总下载量: 391
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-08