undeadline / yandex-weather-laravel
Package for Laravel what use yandex weather api.
v1.0.1
2020-03-14 20:10 UTC
Requires
- php: >=7.2
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- orchestra/testbench: ^5.1
- phpunit/phpunit: 9.*
This package is auto-updated.
Last update: 2025-04-18 03:24:14 UTC
README
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