Download the PHP package fadhriza/indonesia-weather-widget without Composer
On this page you can find all versions of the php package fadhriza/indonesia-weather-widget. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package indonesia-weather-widget
Indonesia Weather Widget Plugin for Filament
A Filament plugin that displays real-time weather information from BMKG (Badan Meteorologi, Klimatologi, dan Geofisika) API as a dashboard widget.
Features
- 🌤️ Real-time weather data from BMKG API
- 📊 Displays temperature, humidity, wind speed, cloud cover, and more
- 🔄 Refresh button to update weather data
- 🎨 Beautiful, responsive UI using Filament components
- 🌍 Configurable region code for different locations in Indonesia
Installation
Install the package via Composer:
The service provider will be automatically registered via Laravel's package discovery.
Usage
Register the Widget in Your Panel
To use the widget in your Filament panel, you need to register it in your panel provider. If you don't have a panel provider yet, create one:
Configure Region Code
The widget uses a default region code (31.71.03.1001 for Jakarta Pusat). You can customize the region code by modifying the widget instance or passing it when mounting:
The widget accepts a regionCode property. You can find region codes from BMKG documentation.
Example Region Codes
- Jakarta Pusat:
31.71.03.1001 - Jakarta Selatan:
31.74.01.1001 - Bandung:
32.73.01.1001 - Surabaya:
35.78.01.1001
(Note: These are examples. Please refer to BMKG documentation for accurate region codes.)
Building Assets
After making changes to the JavaScript file, rebuild the assets:
Or build all assets:
Project Structure
API Information
This plugin uses the BMKG Public API:
- Endpoint:
https://api.bmkg.go.id/publik/prakiraan-cuaca?adm4={region_code} - Documentation: See
bmkg_weather_api_docs.txt
Weather Data Fields
The widget displays the following information:
- Temperature (t): Air temperature in °C
- Humidity (hu): Air humidity in %
- Weather Condition (weather_desc): Weather description in Indonesian
- Wind Speed (ws): Wind speed in km/h
- Wind Direction (wd): Wind direction
- Cloud Cover (tcc): Cloud coverage in %
- Visibility (vs_text): Visibility distance in km
- Local Time (local_datetime): Local time
- UTC Time (utc_datetime): UTC time
Development
Requirements
- PHP ^8.2
- Laravel ^12.0
- Filament ^4.0
- Node.js (for building assets)
Development Commands
License
This plugin is open-sourced software licensed under the MIT license.
Credits
All versions of indonesia-weather-widget with dependencies
filament/filament Version ^4.0
filament/widgets Version ^4.0
laravel/framework Version ^10.0|^11.0|^12.0
spatie/laravel-package-tools Version ^2.0