Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Forecast Php

Forecast Php Laravel Package

nwidart/forecast-php

nwidart/forecast-php is a lightweight PHP wrapper for the Forecast.io weather API. It lets Laravel and standalone PHP applications fetch current conditions and forecasts for a location through a simple interface, without manually parsing raw API responses.

Deep Wiki
Context7

PHP API Wrapper for Forecast.io

Frequently asked questions about Forecast Php
How do I install nwidart/forecast-php with Composer?
Install it with Composer using composer require nwidart/forecast-php. The provided README excerpt does not show a version constraint, so Composer will resolve the latest compatible release. After installation, check the package README for any required service provider or configuration steps.
Does nwidart/forecast-php support Laravel package auto-discovery?
If the package declares Laravel service providers under extra.laravel in composer.json, Laravel auto-discovery will register them automatically. The README excerpt provided does not confirm the service provider or facade names. On older Laravel versions you may need to add the provider and alias manually in config/app.php.
How do I configure the Forecast.io API key in a Laravel app?
You need a Forecast.io API key before making requests. Pass the key to the wrapper client directly or publish and edit the package config file if one is provided. The README excerpt does not list the exact config key, so verify it in the package source or config file.
Can I use nwidart/forecast-php outside Laravel?
Yes, the package is described as a lightweight PHP wrapper for the Forecast.io API, so it can be used in standalone PHP applications. You instantiate the client with your API key and call its forecast methods directly. Laravel is not required for the core wrapper.
How do I get current weather conditions and a forecast for a location?
Use the wrapper's client methods to request current conditions or a forecast for the location coordinates or address supported by Forecast.io. The package handles the API request and response parsing so you do not manually decode raw JSON. The README excerpt does not show exact method names, so check the package API for the available calls.
Which Laravel versions does nwidart/forecast-php support?
The provided README excerpt and package metadata do not list Laravel version constraints. Check the composer.json require section for the supported illuminate/support or laravel/framework versions. Because Forecast.io itself was retired, the package may target older Laravel releases.
How can I test nwidart/forecast-php without calling the live Forecast.io API?
Mock the HTTP layer or inject a fake client so tests do not hit the live weather API. If the wrapper uses Laravel's HTTP client, you can use HTTP fake responses where applicable. The package documentation excerpt does not describe built-in test helpers, so isolate the API calls behind your own interface for reliable tests.
Is nwidart/forecast-php still maintained and usable in production?
The repository field is unknown and the README excerpt is empty, so check the package's activity, open issues, and last release before relying on it. Forecast.io was later rebranded as Dark Sky and its API was discontinued, which affects whether the upstream service still works. For production, plan a migration path to a supported weather API.
What are alternatives to nwidart/forecast-php for Laravel weather data?
You can use Laravel's HTTP client directly with a current weather provider such as OpenWeatherMap, WeatherAPI, or another supported service. There are also Laravel-specific weather packages that wrap those providers. Choose one with active maintenance and an API that fits your forecast requirements.
How should I handle errors and rate limits with nwidart/forecast-php?
Wrap forecast calls in try/catch blocks, validate that the API key is present, and handle HTTP errors, timeouts, and rate-limit responses gracefully. Cache successful responses where appropriate to reduce API calls. Since the Forecast.io service was discontinued, also monitor for upstream failures and have a fallback provider.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package