PHPackages                             coderjp/forecast - 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. coderjp/forecast

ActiveLibrary

coderjp/forecast
================

A Laravel package that generates a 5 day forecast for the given IP address

0.0.2(3y ago)015PHP

Since Mar 4Pushed 3y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (3)Used By (0)

Forecast
========

[](#forecast)

Forecast allows you to fetch the Weather Forecast for the next 5 days based on an IP address.

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

[](#installation)

Require this package with composer using the following command:

```
composer require coderjp/forecast

```

Publish the various resources needed

```
php artisan vendor:publish --provider="Coderjp\Forecast\Providers\ForecastProvider"

```

Run the migrations - this library stores all location and forecast data in the database.

```
php artisan migrate

```

Configuration
-------------

[](#configuration)

All configuration is stored in `config/forecast.php`. By default there are a handful of drivers used for geolocation and forecasting already enabled.

Some drivers require API keys in order to use them - these can be specified in the config file.

Should a driver fail to get a response (server down, invalid/missing api key etc.), the next driver in the list will be used, and so on.

Usage
-----

[](#usage)

By default, the library publishes a simple route to `/forecast`. This allows you to enter an IP address and lookup the five day forecast in the browser.

### Models

[](#models)

All data is cached in the database. Two models are available for querying this data:

- **`Coderjp\Forecast\Models\Forecast`** - Holds the location data
- **`Coderjp\Forecast\Models\Day`** - Holds each day's forecast

### CLI

[](#cli)

A command line tool is available for looking up the forecast for an IP:

```
php artisan forecast:ip {ip}

5 Day Forecast for Brisbane, AU (123.211.61.50)
+-----+-----------------+-------------+
| Day | Condition       | Temperature |
+-----+-----------------+-------------+
| Sat | ScatteredClouds | 30°C        |
| Sun | Fog             | 30°C        |
| Mon | ScatteredClouds | 33°C        |
| Tue | Overcast        | 34°C        |
| Wed | Overcast        | 32°C        |
+-----+-----------------+-------------+

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

1171d ago

### Community

Maintainers

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

---

Top Contributors

[![coderjp](https://avatars.githubusercontent.com/u/6319296?v=4)](https://github.com/coderjp "coderjp (4 commits)")

---

Tags

geolocationIPweatherforecast

### Embed Badge

![Health badge](/badges/coderjp-forecast/health.svg)

```
[![Health](https://phpackages.com/badges/coderjp-forecast/health.svg)](https://phpackages.com/packages/coderjp-forecast)
```

###  Alternatives

[geoip2/geoip2

MaxMind GeoIP2 PHP API

2.5k85.4M294](/packages/geoip2-geoip2)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[rugaard/weatherkit

Integrate Apple WeatherKit API into your project

111.4k](/packages/rugaard-weatherkit)

PHPackages © 2026

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