PHPackages                             oldman10000/weather-app - 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. oldman10000/weather-app

ActiveProject[API Development](/categories/api)

oldman10000/weather-app
=======================

Gets 5 day weather forecast for a guest identified only by IP address

1.0.13(3y ago)021PHP

Since Sep 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Oldman10000/weatherapp)[ Packagist](https://packagist.org/packages/oldman10000/weather-app)[ RSS](/packages/oldman10000-weather-app/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (15)Used By (0)

Weather App
===========

[](#weather-app)

Use your IP address to retrieve a simple 5 day weather forecast using AccuWeather Api.

How to install in your Laravel Project
--------------------------------------

[](#how-to-install-in-your-laravel-project)

Enter the below command in your project directory.

`composer require oldman10000/weather-app:^1.0.*`

This will install the package in your vendor directory.

At this point it is probably not a bad idea to clear your cache to make sure everything installs correctly.

`php artisan cache:clear``php artisan route:clear``php artisan view:clear`

It is also sensible to run the following command to make sure the migrations classes work correctly.

`composer dump-autoload`

As a failsafe, you can publish all the vendor files within your local project with the following command. This also allows you to overwrite code should you so choose.

`php artisan vendor:publish --provider="Oldman10000\WeatherApp\WeatherAppServiceProvider"`

It will be necessary anyway to publish the public folder which includes some CSS and icons.

`php artisan vendor:publish --tag=public --force`

You will need to create a database in SQL using the command.

`create database weatherapp;`

To migrate the new tables run the command:

`php artisan migrate`

View the project
----------------

[](#view-the-project)

Test that the site is running correctly by starting up your development host

`php artisan serve`

Go to \[localhost\]/weather in your browser which will be the 'homepage' for this project. On a live site the input field will autofill with the client IP address but on a dev server there isn't much point to this as it will just show 127.0.0.1 localhost IP. You can find your IP address on [this website](https://whatismyipaddress.com/) or simply by googling it. When you enter the ip address you will be redirected to a page displaying the 5 day forecast for the location of your IP address. Results shown below for IP address 156.0.201.255

[![image](https://user-images.githubusercontent.com/73402591/189522092-5d9e0c9e-ba31-41d4-a7b7-8b52f0463656.png)](https://user-images.githubusercontent.com/73402591/189522092-5d9e0c9e-ba31-41d4-a7b7-8b52f0463656.png)

Useful CLI commands
-------------------

[](#useful-cli-commands)

It is possible to add IP addresses to the database using the following command:

`php artisan create:insert-ipaddresses {ip address}`

Get weather data for your ip address directly in the CLI with

`php artisan get:weather-data {ip-address}`

Improvements
------------

[](#improvements)

- There is no form validation for the main IP Address form field. The result is that if an invalid IP address is entered, the API returns location data for Ashburn, VA, USA, which is likely the default or first value in their data. It would actually be more useful to us if an error were to be returned in this case rather than to receive incorrect data. It would therefore be nice to add some kind of validation for API addresses to throw an error. There is likely a php package that does this which may be worth researching.
- I noticed that the days returned by the API were sometimes incorrect, which appears to be due to the timezone. The result in the screenshot below was fetched from the API on the 11th September, however as can be seen the first date shown is the 10th September. The AccuWeather API collects weather data only a couple of times a day, once in the morning and once in the evening so it appears at the time that the API collected the data, it was still the 10th September locally (in the UK) but the 11th September in St Lucia as it is GMT+10 over there.

    [![image](https://user-images.githubusercontent.com/73402591/189522255-7acf00f8-18de-4f6c-b868-3d947dd36b96.png)](https://user-images.githubusercontent.com/73402591/189522255-7acf00f8-18de-4f6c-b868-3d947dd36b96.png)

    This is a shortcoming of the API, there are however probably a couple of ways to fix the output here. The first thing that came to mind was to pull the 10 day forecast instead of the 5 day forecast as it currently does. Then Simply display the 5 days starting from the first date which matches 'today' locally.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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

14

Last Release

1391d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a555f9d981ff644f3b4ff9489a3735266ea35ff431569f33ef5b09c68d85d67?d=identicon)[oldman10000](/maintainers/oldman10000)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/oldman10000-weather-app/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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