PHPackages                             oscarmx/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. [Testing &amp; Quality](/categories/testing)
4. /
5. oscarmx/laravel-weather

ActiveLibrary[Testing &amp; Quality](/categories/testing)

oscarmx/laravel-weather
=======================

a weather test SDK

1.0.1(5y ago)27MITPHPCI failing

Since Nov 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/oscar-mx/laravel-weather)[ Packagist](https://packagist.org/packages/oscarmx/laravel-weather)[ RSS](/packages/oscarmx-laravel-weather/feed)WikiDiscussions master Synced 3w ago

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

 laravel-weather
=================

[](#-laravel-weather-)

 A Weather SDK For Laravel

安装
--

[](#安装)

```
$ composer require oscarmx/laravel-weather -vvv
```

配置
--

[](#配置)

本扩展需要使用高德开放平台，你可以自行注册账号，然后创建应用，获取API Key。申请地址：

使用
--

[](#使用)

```
use Oscarmx\LaravelWeather\Weather;

$key = '你的高德开放平台API Key';

$weather = new Weather($key);

##获取实时天气
$response = $weather->getWeather('深圳');

##获取近期天气预报
$response = $weather->getWeather('深圳', 'all');

##第三个参数为返回值类型，可选 json 与 xml，默认 json
$response = $weather->getWeather('深圳', 'all', 'xml');
```

Tips
----

[](#tips)

目前代码为1.0版本，有问题可以给我提Issues

License
-------

[](#license)

[LICENSE](https://github.com/oscar-mx/laravel-weather/blob/master/LICENSE)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

2154d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/53085808?v=4)[mx](/maintainers/oscar-mx)[@oscar-mx](https://github.com/oscar-mx)

---

Top Contributors

[![oscar-mx](https://avatars.githubusercontent.com/u/53085808?v=4)](https://github.com/oscar-mx "oscar-mx (6 commits)")

### Embed Badge

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

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

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k42.5M41.0k](/packages/orchestra-testbench)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k39](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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