PHPackages                             gnahotelsolutions/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. gnahotelsolutions/laravel-weather

ActiveLibrary[API Development](/categories/api)

gnahotelsolutions/laravel-weather
=================================

🌤️ A wrapper around Open Weather Map to get the current weather on a location.

v1.3.0(4y ago)385.3k5[1 issues](https://github.com/gnahotelsolutions/laravel-weather/issues)MITPHPPHP ^7.1|^8.0CI failing

Since Dec 2Pushed 4y ago4 watchersCompare

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

READMEChangelog (4)Dependencies (4)Versions (7)Used By (0)

Laravel Open Weather Map Wrapper
================================

[](#laravel-open-weather-map-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d6b4c2c88ffdeb8b24cf1d9e7c2b87927c17192774b1a2adecd0566b4dab5664/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d776561746865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnahotelsolutions/laravel-weather)[![Build status](https://github.com/gnahotelsolutions/laravel-weather/actions/workflows/laravel.yml/badge.svg)](https://github.com/gnahotelsolutions/laravel-weather/actions/workflows/laravel.yml/badge.svg)[![Quality Score](https://camo.githubusercontent.com/10e5149e91a375373fac8a99aa15dc11a0d8888cafe98dcab960d52a3134eb37/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d776561746865722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gnahotelsolutions/laravel-weather)[![Total Downloads](https://camo.githubusercontent.com/b2a94bd2f275521b9709a1cb42ee0e24d504eeab4a3722a8c7cf51ad31450d35/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d776561746865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnahotelsolutions/laravel-weather)

🌤️ A wrapper around Open Weather Map API (Current weather)

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

[](#installation)

You can install the package via composer:

```
composer require gnahotelsolutions/laravel-weather
```

Usage
-----

[](#usage)

Fill the `WEATHER_API_KEY` environment variable with your own API key to query the server.

```
use GNAHotelSolutions\Weather\Weather;

$weather = new Weather();

// Checking weather by city name
$currentWeatherInGirona = json_decode($weather->get('girona,es'));

// You can use the city id, this will get you unambiguous results
$currentWeatherInGirona = json_decode($weather->find('3121456'));
```

### Units

[](#units)

By default the package uses `metric` for Celsius temperature results, this can be modified using the configuration file or on the fly:

```
$weather = new Weather();

$currentWeatherInGirona = json_decode($weather->inUnits('imperial')->get('girona,es'));
```

### Language

[](#language)

By default the package uses `es` for the description translation, this can be modified using the configuration file or on the fly:

```
$weather = new Weather();

$currentWeatherInGirona = json_decode($weather->inLanguage('en')->get('girona'));
```

### Guzzle Client Instance

[](#guzzle-client-instance)

If you need to use another instance of Guzzle, to modify headers for example:

```
$weather = new Weather();

$guzzle = $this->getSpecialGuzzleClient();

$currentWeatherInGirona = json_decode($weather->using($guzzle)->get('girona'));
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [David Llop](https://github.com/lloople)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 79.4% of commits — single point of failure

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 ~219 days

Total

4

Last Release

1694d ago

PHP version history (3 changes)v1.0.0PHP ^7.1

v1.2.0PHP ^7.1|^7.3

v1.3.0PHP ^7.1|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/777a92668f51536d86a9fed19c92180d626b46f134b002c3a068e92d295c7541?d=identicon)[lloople](/maintainers/lloople)

---

Top Contributors

[![Lloople](https://avatars.githubusercontent.com/u/5665466?v=4)](https://github.com/Lloople "Lloople (27 commits)")[![torralbodavid](https://avatars.githubusercontent.com/u/17132682?v=4)](https://github.com/torralbodavid "torralbodavid (3 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")[![arazprisync](https://avatars.githubusercontent.com/u/75847327?v=4)](https://github.com/arazprisync "arazprisync (1 commits)")[![larsbo](https://avatars.githubusercontent.com/u/754074?v=4)](https://github.com/larsbo "larsbo (1 commits)")

---

Tags

hacktoberfestlaravellaravel-packagelaravel-weatherpackagephpweatherapilaravelweatherOpenWeatherMapgnahotelsolutions

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[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)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)

PHPackages © 2026

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