PHPackages                             astrodog/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. astrodog/laravel-weather

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

astrodog/laravel-weather
========================

Package for get the weather data

v2.0.0(1y ago)0171MITPHPPHP ^8.2

Since Sep 21Pushed 1y agoCompare

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

READMEChangelog (3)Dependencies (12)Versions (7)Used By (0)

🌤 Open-Meteo Weather API
========================

[](#-open-meteo-weather-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ee7f14e06d0b8b37304713c6a0900f882599375cc7a58a0f31809dfc088be081/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d69636861656c6e6162696c3233302f6c61726176656c2d776561746865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/michaelnabil230/laravel-weather)[![GitHub Tests Action Status](https://camo.githubusercontent.com/45128b77a8795f67cf43b76290c2559d6c9852e99ce98c1fe6b695018092c68d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d69636861656c6e6162696c3233302f6c61726176656c2d776561746865722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/michaelnabil230/laravel-weather/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3fec4de204b9322524b0fe2a22570d8d700c2833711418b019401f9a3a8a07b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d69636861656c6e6162696c3233302f6c61726176656c2d776561746865722f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/michaelnabil230/laravel-weather/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/936b49c7b2ca4e5ed054692155ad1e5072835653be429a56fe49de0b20f3524d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d69636861656c6e6162696c3233302f6c61726176656c2d776561746865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/michaelnabil230/laravel-weather)

[![Open Meteo](https://camo.githubusercontent.com/07df8b2f04deae1e4f29d9cfbc7fe90d5eb6f6fe58b91e61a020b9b7aa7627fd/68747470733a2f2f63646e2e737562737461636b2e636f6d2f696d6167652f66657463682f775f313336302c635f6c696d69742c665f6175746f2c715f6175746f3a626573742c666c5f70726f67726573736976653a73746565702f68747470732533412532462532466275636b65746565722d65303562626338342d626161332d343337652d393531382d6164623332626537373938342e73332e616d617a6f6e6177732e636f6d2532467075626c6963253246696d6167657325324666643064373935332d356139642d343431632d623539662d3463646532343435303361315f393334783436312e706e67)](https://open-meteo.com/en)

Download Meteorological Data from OPEN-METEO API ()

Open-Meteo collaborates with National Weather Services providing Open Data with 11 to 2 km resolution. Our high performance APIs select the best weather model for your location and provide data as a simple JSON API.

APIs are free without any API key for open-source developers and non-commercial use. You can embed them directly into your app.

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

[](#installation)

You can install the package via composer:

```
composer require michaelnabil230/laravel-weather
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-weather-config"
```

This is the contents of the published config file:

```
return [
    'temperature_unit' => 'celsius',
    'wind_speed_unit' => 'kmh',
    'precipitation_unit' => 'mm',
    'time_format' => 'iso8601',
    'timezone' => 'GMT',
];
```

Usage
-----

[](#usage)

```
$weather = \MichaelNabil230\Weather\Weather::location(30.0812558, 31.2511902)
    ->current()
    ->get();
```

Functions:

**Parameter****Format****Required****Default**currentWeatherBoolNofalsetemperatureUnitStringNocelsiuswindSpeedUnitStringNokmhprecipitationUnitStringNokmhtimeFormatStringNoiso8601timezoneStringNoUTCpastDaysInteger (0-2)No015-minutely Functions:

**Variable****Valid time****Unit**temperature\_2m\_15minInstant°C (°F)relativeHumidity\_2m\_15minInstant%dewPoint\_2m\_15minInstant°C (°F)apparentTemperature\_15minInstant°C (°F)windSpeed\_10m\_15minInstantkm/h (mph, m/s, knots)windSpeed\_80m\_15minInstantkm/h (mph, m/s, knots)windDirection\_10m\_15minInstant°windDirection\_80m\_15minInstant°windGusts\_10m\_15minPreceding 15 minutes maxkm/h (mph, m/s)shortwaveRadiation\_15minPreceding 15 minutes meanW/m²directRadiation\_15minPreceding 15 minutes meanW/m²directNormalIrradiance\_15minPreceding 15 minutes meanW/m²diffuseRadiation\_15minPreceding 15 minutes meanW/mv²globalTiltedIrradiance\_15minPreceding 15 minutes meanW/mv²sunshineDuration\_15MinPreceding 15 minutes sumSecondsprecipitation\_15minPreceding 15 minutes summm (inch)snowfall\_15minPreceding 15 minutes sumcm (inch)rain\_15minPreceding 15 minutes summm (inch)cape\_15minInstantJ/kgvisibility\_15minInstantmetersweatherCode\_15minInstantWMO codeHourly Functions:

**Variable****Valid time****Unit**temperature\_2mInstant°C (°F)relativeHumidity\_2mInstant%dewPoint\_2mInstant°C (°F)apparentTemperatureInstant°C (°F)pressureMslInstanthPacloudCoverInstant%cloudCoverLowInstant%cloudCoverMidInstant%cloudCoverHighInstant%windSpeed\_10mInstantkm/h (mph, m/s, knots)windSpeed\_80mInstantkm/h (mph, m/s, knots)windSpeed\_120mInstantkm/h (mph, m/s, knots)windSpeed\_180mInstantkm/h (mph, m/s, knots)windDirection\_10mInstant°windDirection\_80mInstant°windDirection\_120mInstant°windDirection\_180mInstant°windGusts\_10mPreceding hour maxkm/h (mph, m/s)shortwaveRadiationPreceding hour mean W/m²directRadiationPreceding hour meanW/m²diffuseRadiationPreceding hour meanW/mv²vaporPressureDeficitInstantkPaevapotranspirationPreceding hour summm (inch)precipitationPreceding hour summm (inch)precipitationProbabilityPreceding hour probability%hourlyWeatherCodeInstantWMO codesnowHeightInstantmetersfreezingLevelHeightInstantmeterssoilTemperature\_0cmInstant°C (°F)soilTemperature\_6cmInstant°C (°F)soilTemperature\_18cmInstant°C (°F)soilTemperature\_54cmInstant°C (°F)soilMoisture\_0\_1cmInstantm³/m³soilMoisture\_1\_3cmInstantm³/m³soilMoisture\_3\_9cmInstantm³/m³soilMoisture\_9\_27cmInstantm³/m³soilMoisture\_27\_81cmInstantm³/m³allHourly--Daily Functions:

**Variable****Unit**temperature\_2mMax°C (°F)temperature\_2mMin°C (°F)apparentTemperatureMax°C (°F)apparentTemperatureMin°C (°F)precipitationSummmprecipitationHourshoursdailyWeatherCodeWMO codesunriseiso8601sunsetiso8601windSpeed\_10mMaxkm/h (mph, m/s, knots)windGusts\_10mMaxkm/h (mph, m/s, knots)windDirection\_10mDominant°shortwaveRadiationSumMJ/m²allDaily-WMO Weather interpretation codes (WW):

**Code****Description**0Clear sky1, 2, 3Mainly clear, partly cloudy, and overcast45, 48Fog and depositing rime fog51, 53, 55Drizzle: Light, moderate, and dense intensity56, 57Freezing Drizzle: Light and dense intensity61, 63, 65Rain: Slight, moderate, and heavy intensity66, 67Freezing Rain: Light and heavy intensity71, 73, 75Snowfall: Slight, moderate, and heavy intensity77Snow grains80, 81, 82Rain showers: Slight, moderate, and violent85, 86Snow showers slight and heavy95 \*Thunderstorm: Slight or moderate96, 99 \*Thunderstorm with slight and heavy hailTesting
-------

[](#testing)

```
composer test
```

Support
-------

[](#support)

[![Image for sponsor](./.assets/sponsors.png)](https://github.com/sponsors/michaelnabil230)

Or

[![Ko-fi](.assets/ko-fi.png)](https://ko-fi.com/michaelnabil230)[![Buymeacoffee](.assets/buymeacoffee.png)](https://www.buymeacoffee.com/michaelnabil230)[![Paypal](.assets/paypal.png)](https://www.paypal.com/paypalme/MichaelNabil23)

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Michael Nabil](https://github.com/MichaelNabil230)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance46

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

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

Total

5

Last Release

405d ago

Major Versions

v1.0.3 → v2.0.02025-04-03

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.3PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3bd35215e2fd68dcc7406c940df4d5063cdef2b5b4f7b2177131fdc46e23f77?d=identicon)[jcmcclorey](/maintainers/jcmcclorey)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (35 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (31 commits)")[![michaelnabil230](https://avatars.githubusercontent.com/u/46572405?v=4)](https://github.com/michaelnabil230 "michaelnabil230 (25 commits)")[![jcmcclorey](https://avatars.githubusercontent.com/u/33734757?v=4)](https://github.com/jcmcclorey "jcmcclorey (2 commits)")

---

Tags

laravellaravel-weatherMichaelNabil230

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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