Get weather data with Laravel Weather
4 years ago
Laravel Weather is a good package which we can use to get weather data. It's a wrapper around Open Weather Map API (Current weather).
Installation
You can install the package via composer:
composer require gnahotelsolutions/laravel-weather
Usage
$weather = new Weather();
// Checking weather by city name
$currentWeatherInGirona = $weather->get('girona,es');
// You can use the city id, this will get you unambiguous results
$currentWeatherInGirona = $weather->find('3121456');
Source Code
https://github.com/gnahotelsolutions/laravel-weather?ref=learninglaravel