arshaviras/weather-widget
Composer 安装命令:
composer require arshaviras/weather-widget
包简介
A weather widget for Filament
README 文档
README
A beautiful, configurable weather widget for your Filament dashboard.
Powered by the OpenWeatherMap API, fully translatable, and supports °C/°F, animated Weather Icons, and optional response caching.
Features
- 🌤️ Displays current temperature, condition, hourly forecast and weather icons
- 🔁 Auto-refresh at a configurable interval
- ☁️ Supports both metric and imperial units (°C/°F)
- 🌍 Multi-language support
- 🧠 Optional caching (prevents exceeding API rate limits)
- ⚙️ Customizable location by
city - 🎨 Supports 3 icon styles: Monochrome, Line, and Fill
- 🔄 Supports static and animated icon variants
Requirements
- PHP 8.2 or higher
- Laravel 11.x, 12.x or 13.x
- Filament 4.x or 5.x
Installation
You can install the package via composer:
composer require arshaviras/weather-widget
Setup
1. Register the Widget
Add the widget to your Filament panel configuration:
use Arshaviras\WeatherWidget\Widgets\WeatherWidget; use Filament\Panel; public function panel(Panel $panel): Panel { return $panel // ... other configuration ->widgets([ //... WeatherWidget::class, ]) }
2. Configuration
Publish the config file:
php artisan vendor:publish --tag="weather-widget-config"
This is the contents of the published config file:
return [ /** * API Key for Current Weather Data * You can get your API key from OpenWeatherMap: * https://openweathermap.org/price */ 'api_key' => env('OPENWEATHER_API_KEY', ''), /** * Default city for weather data */ 'city' => 'Yerevan', /** * Units for temperature and other measurements * Options: 'metric', 'imperial' * 'metric' - Celsius (°C), 'imperial' - Fahrenheit (°F) * Default is 'metric' */ 'units' => 'metric', /** * Refresh (Poll) interval in minutes * This determines how often the weather data will be refreshed. * This also factors into the cache duration. */ 'refresh_minutes' => 30, /** * Icon settings * You can customize the icon set and variant used in the widget. * 'icon_set' can be 'fill', 'line', or 'monochrome'. */ 'icon_set' => 'fill', /** * Icon variant * Options: 'static', 'animated' (only for fill/line icons) */ 'icon_variant' => 'animated', ];
3. Translations (Optional)
If you want to customize the translations, you can publish the translations file:
php artisan vendor:publish --tag="weather-widget-translations"
Usage
Once the widget is registered, a "Weather Widget" will automatically be added to your Filament Dashboard.
Available Icon Sets
fill– Filled iconsline– Outlined iconsmonochrome– Black/White icons
🎨 fill – Filled Icons
| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
✏️ line – Outlined Icons
| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
🌓 monochrome – Black & White Icons
| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
Available Icon Variants
Static and Animated (only for fill/line icons)
static- Static Iconsanimated- Animated icons
Credits
Meteo Icons by Bas Milius
arshaviras/weather-widget 适用场景与选型建议
arshaviras/weather-widget 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.73k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2025 年 11 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「filament」 「filament-plugin」 「arshaviras」 「weather-widget」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 arshaviras/weather-widget 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 arshaviras/weather-widget 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 arshaviras/weather-widget 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
jitone-ai is a powerful FilamentPHP plugin that integrates AI-powered features directly into your Filament forms.
Send Notification to discord channel Webhook using native FilamentPHP Notification Facade class
Alfabank REST API integration
Database-driven onboarding for Filament: progress checklists and guided spotlight tours, translatable to any locale.
Laravel package for Accurate Online API integration.
Create-project starter for a Laravel application with the public Capell CMS foundation.
统计信息
- 总下载量: 3.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-04





