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

ActiveLibrary

myweather/forecast
==================

A php wrapper for the Forecast.io API.

v1.0(11y ago)544[1 issues](https://github.com/Craytor/forecast/issues)MITPHPPHP &gt;=5.4.0

Since Mar 16Pushed 10y ago3 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

MyWeather Forecast
==================

[](#myweather-forecast)

MyWeather Forecast was created by, and is maintained by [Tyler Youschak](http://tjyouschak.me). MyWeather Forecast uses [Forecast.io](https://developer.forecast.io/)'s weather API, so a free API key will be required. I've chosen Forecast.io due to the really inexpensive API, which supplies you with 1,000 free calls per day. If you go over 1,000 calls, it's only one-cent per 10,000 calls.

Requirements
------------

[](#requirements)

Before installing Forecast, you need to make sure you have `cURL` installed on your server! Chances are this will already be completed!

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

[](#installation)

To get the latest version of MyWeather Forecast, simply add the following line to the require block of your `composer.json` file:

```
"myweather/forecast": "~1.0@dev"

```

You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.

If you're using Laravel 5, then you can register our service provider. Open up `config/app.php` and add the following to the `providers` array.

- `'MyWeather\ForecastServiceProvider'`

Usage
-----

[](#usage)

Usage of MyWeather Forecast is quite simple. To get started, you must first *use* our package. This will allow you to start using our package, here's an example: `use MyWeather\ForecastClient;`

Alright! We are now using the package, but how and where are we going to declare our API key (provided by [Forecast.io](https://developer.forecast.io/))? Well, let's take a look:

- You can use it by typing the following: `$client = ForecastClient($apiKey);` This will go ahead and set your API key for your request.
- Now your going to want to set the latitude (lat) and longitude (lng) of the location your trying to find. It may be best to use Javascript and ask the person if you can use their location, or you can just hard code in a geo-location look up. Here's how you can do that: `$forecast = $client->get('lat','lng');`
- Now, let's get the viddles! You can now (since you have declared your API key and lat &amp; lng), use our `currently`, `minutely`, `hourly`, and `daily` selectors which will return that information in an array.

Here's a look at all of that combined:

```
use MyWeather\ForecastClient;

$client = new ForecastClient($apiKey);
$forecast = $client->get('lat','lng');
$currently = $forecast->currently();
```

Contribute
----------

[](#contribute)

Have an idea of a new data selector that should be added? Or do you have an idea that will make this package even better? Open an issue report, and we'll have a gander!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.7% 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

Unknown

Total

1

Last Release

4082d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/729d0550e72dd46201e09999d35e346269e1f4966582a0ef6ee0f10871795407?d=identicon)[Craytor](/maintainers/Craytor)

---

Top Contributors

[![Craytor](https://avatars.githubusercontent.com/u/3680866?v=4)](https://github.com/Craytor "Craytor (33 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (6 commits)")[![joecohens](https://avatars.githubusercontent.com/u/1803556?v=4)](https://github.com/joecohens "joecohens (4 commits)")

---

Tags

phpweatherforecast

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[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)
