rahulswt7 / yii2-weather-widget
Yii2 weather widget
Package info
github.com/rahul05ranjan/yii2-weather-widget
Type:yii2-extension
pkg:composer/rahulswt7/yii2-weather-widget
0.1.3
2019-11-13 19:15 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2026-03-14 09:47:00 UTC
README
This widget has 3 nodes of data.
- Currently
- Hourly
- Daily
How to use it.
Just add below lines in your composer.json file
"rahulswt7/yii2-weather-widget" : "^0.1.3"
Open your terminal and run command composer install
or
composer require rahulswt7/yii2-weather-widget
After installation
Initially Currently weatherdata will show.
<?php echo rahulswt7\weatherWidgets\WeatherForcast::widget(); ?>
To show hourly weather report
<?php echo rahulswt7\weatherWidgets\WeatherForcast::widget([ 'currently' => false, 'hourly' => true ]); ?>
To show daily weather report
<?php echo rahulswt7\weatherWidgets\WeatherForcast::widget([ 'currently' => false, 'hourly' => false, 'daily' => true ]); ?>
Packagist link
Github link
Issues link