Laravel Weather Pack

The Laravel Weather Pack by Henrik B Hansen allows you to get weather data from different weather providers in your Laravel projects. Here is the facade usage of this package as follows:

Weather response will always be a Collection of responses.
Forecast days depend on the weather service provider.
$weather = weather()->getForecast($request);
Current weather
$weather->first()->getCurrently();

You can customize the request when you get a forecast. example:

use Vemcogroup\Weather\Providers\Provider;
use Vemcogroup\Weather\Request as WeatherRequest;
$request = new WeatherRequest ('1 Infinite Loop, Cupertino, CA 95014, USA');
$request->withUnits(Provider::WEATHER_UNITS_FAHRENHEIT);

Laravel Weather comes out of the package and supports Dark Sky and Wetaherstack APIs.

You can define your own provider to work with this package by using the abstract class provided.

You can learn more about this package, get full installation instructions, and view the source code on GitHub at vemcogroup/laravel-weather.

  Quote

KARABAY A, 2020 . Laravel Weather Pack,

https://www.karabayyazilim.com/blog/php/framework/laravel/laravel-hava-durumu-paketi-2020-09-17-145741

(Accessed September 17, 2020).


  Share this post

Comments (0)

Comment

Subscribe
Sign up for the email newsletter to be the first to know about my blog posts