yandex-weather-laravel maintained by undeadline
Yandex weather for Laravel
Installing guide
The recommended way to install YW is through Composer.
composer require undeadline/yandex-weather-laravel
After composer require you need use this command
php artisan vendor:publish --tag=config
$latitude = 15.8921;
$longitude = 82.78821;
$params = [
'lang' => 'ru_RU', // response language
'limit' => 1, // forecast period
'hours' => true, // response is contains horly period
'extra' => true // detailed precipitation forecast
];
$weather = new \Undeadline\YW\YandexWeather($latitude, $longitude, $params);
echo $weather->temperature(); // current temperature
echo $weather->feelsTemperature(); // current feels temperature
echo $weather->icon(); // url for temperature icon