PHPackages                             zhengguoze/my-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. [API Development](/categories/api)
4. /
5. zhengguoze/my-weather

ActiveLibrary[API Development](/categories/api)

zhengguoze/my-weather
=====================

天气api

1.0.0(5y ago)013MITPHP

Since Dec 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/zhengguoze/my-weather)[ Packagist](https://packagist.org/packages/zhengguoze/my-weather)[ RSS](/packages/zhengguoze-my-weather/feed)WikiDiscussions master Synced 2d ago

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

 myWeather
===========

[](#-myweather-)

 天气api.

Installing
----------

[](#installing)

```
$ composer require zhengguo/myWeather -vvv
```

Usage
-----

[](#usage)

use Overtrue\\Weather\\Weather;

$key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';

$weather = new Weather($key);Copy 获取实时天气# $response = $weather-&gt;getWeather('深圳');

在 Laravel 中使用# 在 Laravel 中使用也是同样的安装方式，配置写在 config/services.php 中： . . . 'weather' =&gt; \[ 'key' =&gt; env('WEATHER\_API\_KEY'), \],Copy 然后在 .env 中配置 WEATHER\_API\_KEY ： WEATHER\_API\_KEY=xxxxxxxxxxxxxxxxxxxxxCopy 可以用两种方式来获取 Overtrue\\Weather\\Weather 实例： 方法参数注入# . . . public function edit(Weather $weather) { $response = $weather-&gt;getWeather('深圳'); } . . .Copy 服务名访问# . . . public function edit() { $response = app('weather')-&gt;getWeather('深圳'); } . . .

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/zhengguo/myWeather/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/zhengguo/myWeather/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

3

Last Release

1959d ago

Major Versions

0.01 → 1.0.02020-12-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e0054db8eb84a53daf7f0e224024a6f3e7477c8691deea200b3a0c7d86da1df?d=identicon)[zhengguoze](/maintainers/zhengguoze)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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