arshaviras/weather-widget
Laravel package that adds a simple weather widget to your app. Provides an easy way to display current weather details in a reusable component, suitable for dashboards or public pages, with straightforward setup and configuration.
![]()
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.
cityYou can install the package via composer:
composer require arshaviras/weather-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,
])
}
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',
];
If you want to customize the translations, you can publish the translations file:
php artisan vendor:publish --tag="weather-widget-translations"
Once the widget is registered, a "Weather Widget" will automatically be added to your Filament Dashboard.
fill – Filled iconsline – Outlined iconsmonochrome – Black/White iconsfill – Filled Icons| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
line – Outlined Icons| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
monochrome – Black & White Icons| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
Static and Animated (only for fill/line icons)
static - Static Iconsanimated - Animated iconsMeteo Icons by Bas Milius
How can I help you explore Laravel packages today?