rahulswt7/yii2-weather-widget

Yii2 weather widget

0.1.3 2019-11-13 19:15 UTC

This package is auto-updated.

Last update: 2024-11-14 06:51:46 UTC


README

This widget has 3 nodes of data.

  1. Currently
  2. Hourly
  3. 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