Get weather data with Laravel Weather
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).
You can install the package via composer:
composer require gnahotelsolutions/laravel-weather
$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');
This post is submitted by one of our members. You may submit a new post here.