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 today

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 43% 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

2100d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69374534c9d4464008e01290517e98ca7c44607824150b04362811d42f944c6f?d=identicon)[oscar-mx](/maintainers/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.2k39.1M32.1k](/packages/orchestra-testbench)[jasonmccreary/laravel-test-assertions

A set of helpful assertions when testing Laravel applications.

3513.9M32](/packages/jasonmccreary-laravel-test-assertions)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

31252.7k5](/packages/webmozarts-strict-phpunit)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)[lastzero/test-tools

Increases testing productivity by adding a service container and self-initializing fakes to PHPUnit

2244.3k13](/packages/lastzero-test-tools)

PHPackages © 2026

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