PHPackages                             wwb/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wwb/weather

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wwb/weather
===========

A weather SDK.

0.0.2(3y ago)010MITPHP

Since Apr 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/weiwenbi/weather)[ Packagist](https://packagist.org/packages/wwb/weather)[ RSS](/packages/wwb-weather/feed)WikiDiscussions main Synced 1mo ago

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

天气查询
----

[](#天气查询)

### 需求分析

[](#需求分析)

- 按地名查询实时天气；
- 获取最近的天气预报。

### 功能设计

[](#功能设计)

- **主要业务**，获取天气信息；
- **异常处理**，提供统一的异常类，方便调用方定位异常；
- **自定义参数**，需要支持自定义参数，比如超时时间等；
- **提供 Laravel Service Provider**，为 Laravel 框架提供专属封装的入口。

### Laravel 使用方法

[](#laravel-使用方法)

1、在 config 目录下新建 services.php 配置文件，输入

```
return [
     'weather' => [
        'key' => env('WEATHER_API_KEY'),
    ],
];
```

2、在env中配置参数

```
WEATHER_API_KEY=xxxxxxxxxxxxxxxxx
```

3、使用

```
app('weather')->getWeather('广州');
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

2

Last Release

1120d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/19a46b6f4d3500535520d412a9ec82a9c637e0fcf6cae1d4986bc8a3eb54cb20?d=identicon)[weiwenbi](/maintainers/weiwenbi)

---

Top Contributors

[![weiwenbi](https://avatars.githubusercontent.com/u/51066798?v=4)](https://github.com/weiwenbi "weiwenbi (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[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)
