PHPackages                             vemcogroup/laravel-weather - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. vemcogroup/laravel-weather

ActiveLibrary[API Development](/categories/api)

vemcogroup/laravel-weather
==========================

Weather package for Laravel to use different providers to get weather info

3.0.8(1mo ago)5525.0k↑31.8%8MITPHPPHP ^8.0CI failing

Since Jul 29Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/vemcogroup/laravel-weather)[ Packagist](https://packagist.org/packages/vemcogroup/laravel-weather)[ Docs](https://github.com/vemcogroup/laravel-weather)[ RSS](/packages/vemcogroup-laravel-weather/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (22)Used By (0)

Laravel Weather
===============

[](#laravel-weather)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c67c16e6af0590a5ba2c783f0d75ba64775a8413e1073a2160ffe5576e931811/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76656d636f67726f75702f6c61726176656c2d776561746865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vemcogroup/laravel-weather)[![Total Downloads](https://camo.githubusercontent.com/9b1f5fffcb5fbaf9c86855fb5dd15cd9fddac31201dfda1b5318070eaf4ae0b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76656d636f67726f75702f6c61726176656c2d776561746865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vemcogroup/laravel-weather)[![tests](https://github.com/vemcogroup/laravel-weather/workflows/tests/badge.svg)](https://github.com/vemcogroup/laravel-weather/workflows/tests/badge.svg)

Description
-----------

[](#description)

This package allows you to fetch weather data from different weather providers

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require vemcogroup/laravel-weather
```

The package will automatically register its service provider.

To publish the config file to `config/weather.php` run:

```
php artisan vendor:publish --provider="Vemcogroup\Weather\WeatherServiceProvider"
```

The default configuration can be seen [here](https://github.com/vemcogroup/laravel-weather/blob/master/config/weather.php)

Usage
-----

[](#usage)

At the moment this package support the following weather services, you can update `WEATHER_PROVIDER` to one of the following

ServiceProvider nameWebsiteGeocodingRemarksDark SkydarkskyManualDeprecated, not able to acquire api key . Will continue to function until March 31st, 2023.WeatherstackweatherstackAutoFor historical data a minimum Standard license is required. For forecast data a minimum Professional license is required.WeatherKitweatherkitAutoNeeds an apple developer account.For other weather services fill free to create an issue or make a Pull Request.

For `Manual` geocoding you need a Google geocode api key.
Acquire it here  and insert it into your .env file.

```
GOOGLE_MAPS_GEOCODING_API_KEY=
```

### Request

[](#request)

Start by setting up your request

```
$request = (new Vemcogroup\Weather\Request('1 Infinite Loop, Cupertino, CA 95014, USA'));
```

By default, it caches the weather response for 24hrs (86.400sec), this can be changed by setting a second parameter to cache timeout (in seconds)

```
$request = (new Vemcogroup\Weather\Request('1 Infinite Loop, Cupertino, CA 95014, USA', 600));
```

*Units*
There two available unit types, default is Metric:

Metric (m): `Vemcogroup\Weather\Providers\Provider::WEATHER_UNITS_METRIC`
Fahrenheit (f): `Vemcogroup\Weather\Providers\Provider::WEATHER_UNITS_FAHRENHEIT`

To change the response units you can do the following:

```
$request->withUnits(Vemcogroup\Weather\Providers\Provider::WEATHER_UNITS_FAHRENHEIT);
```

*Locale*
To change the locale for descriptions, summaries and other texts in the response, do the following:

```
$request->withLocale('nl');
```

Locale need to be an 2-letter ISO Code of your preferred language.

*Dates*If you need to select the dates to get weather data for E.g for historical data, set the dates like this:

```
$request->withDates([$date, ...]);
```

All dates in the array need to `Carbon` objects.

*Options*
If you need to set any extra options based in your selected weather provider you can do the following:

```
$request->withOption('name', 'value');
```

### Current weather and forecast

[](#current-weather-and-forecast)

To get current weather and forecast response you can do this:

```
$weather = weather()->getForecast($request);
```

Weather response will always be a `Collection` of responses.
Forecast days depends on weather service provider.

To get current weather data:

```
$weather->first()->getCurrently(); // DataPoint
```

To get forecast you can take first element of response and get the forecast like this:

```
$weather->first()->getDaily()->getData(); // array
```

Afterward run through the array with represent each day of the forecast on a `DataPoint` object.

### Historical

[](#historical)

To get historical data you can do this:

```
$weather = weather()->getHistorical($request);
```

Remember to set dates on request.
Response will be a collection with keys representing the dates for historical data.

### Response

[](#response)

To see what response data is available look into source code `/src/Objects`

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance90

Actively maintained with recent releases

Popularity40

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~129 days

Recently: every ~53 days

Total

17

Last Release

47d ago

Major Versions

1.0.1 → 2.0.02020-09-09

2.0.5 → 3.0.02023-02-15

PHP version history (3 changes)1.0.0PHP ^7.3

2.0.1PHP ^7.3|^8.0

3.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/38252305?v=4)[Vemco Group A/S](/maintainers/vemcogroup)[@vemcogroup](https://github.com/vemcogroup)

---

Top Contributors

[![mikkp17](https://avatars.githubusercontent.com/u/32388762?v=4)](https://github.com/mikkp17 "mikkp17 (7 commits)")[![danijelk](https://avatars.githubusercontent.com/u/580753?v=4)](https://github.com/danijelk "danijelk (6 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (4 commits)")[![eldor](https://avatars.githubusercontent.com/u/283184?v=4)](https://github.com/eldor "eldor (3 commits)")[![makije](https://avatars.githubusercontent.com/u/1318142?v=4)](https://github.com/makije "makije (2 commits)")[![erminsabotic](https://avatars.githubusercontent.com/u/74930774?v=4)](https://github.com/erminsabotic "erminsabotic (1 commits)")

---

Tags

laravelweatherdarksyweatherstack

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vemcogroup-laravel-weather/health.svg)

```
[![Health](https://phpackages.com/badges/vemcogroup-laravel-weather/health.svg)](https://phpackages.com/packages/vemcogroup-laravel-weather)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[rakibdevs/openweather-laravel-api

Laravel package to connect https://openweathermap.org/ to get customized weather data for any location on the globe immediately

7648.2k](/packages/rakibdevs-openweather-laravel-api)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
