paskuale75/yii2-meteo-forcast

Yii2 widget displays weather forcast

dev-main 2021-05-08 21:16 UTC

This package is auto-updated.

Last update: 2024-04-09 03:42:11 UTC


README

read weather from external source api

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

"paskuale75/yii2-weather-forcast-widget" : "dev-master"

Open your terminal and run command composer install

or

composer require rahulswt7/yii2-weather-widget

After installation

Initially Currently weatherdata will show.

<?php 

echo paskuale75\weather\WeatherForcast::widget();

?>

To show hourly weather report

<?php 

echo paskuale75\weather\WeatherForcast::widget([
	'currently'	=>	false,
	'hourly'	=>	true
]);
?>

To show daily weather report

<?php 

echo paskuale75\weather\WeatherForcast::widget([
	'currently' =>  false,
    'hourly'    =>  false,
    'daily'     =>  true
]);

?>