rahulswt7 / yii2-weather-widget
Yii2 weather widget
Installs: 41
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-14 06:51:46 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 weather
data 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