PHPackages                             zhwei/laravel-autowire - 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. zhwei/laravel-autowire

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

zhwei/laravel-autowire
======================

Laravel Autowire Kit

1.1.0(5y ago)141[3 PRs](https://github.com/zhwei/laravel-autowire/pulls)MITPHPPHP ^7.2

Since Aug 23Pushed 3y ago2 watchersCompare

[ Source](https://github.com/zhwei/laravel-autowire)[ Packagist](https://packagist.org/packages/zhwei/laravel-autowire)[ RSS](/packages/zhwei-laravel-autowire/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Autowire
================

[](#laravel-autowire)

[![Latest Stable Version](https://camo.githubusercontent.com/4e8ebae94c37bf876170d28426f914162c8752f8bcff5f031cbb9171e5a825c2/68747470733a2f2f706f7365722e707567782e6f72672f7a687765692f6c61726176656c2d6175746f776972652f76657273696f6e2e706e67)](https://packagist.org/packages/zhwei/laravel-autowire)[![Total Downloads](https://camo.githubusercontent.com/35db2c39265e32616e437bdd56bba8356c47633a93a3d76c99cd2f02c2291320/68747470733a2f2f706f7365722e707567782e6f72672f7a687765692f6c61726176656c2d6175746f776972652f642f746f74616c2e706e67)](https://packagist.org/packages/zhwei/laravel-autowire)[![tests](https://github.com/zhwei/laravel-autowire/workflows/tests/badge.svg)](https://github.com/zhwei/laravel-autowire/workflows/tests/badge.svg)

Usage
-----

[](#usage)

1. Composer

```
composer require zhwei/laravel-autowire
```

2. Register Service Provider (Lumen only)

```
$app->register(\Zhwei\LaravelAutowire\AutowireServiceProvider::class);
```

3. Autowire

Any class implemented the `Zhwei\LaravelAutowire\AutowireAble` interface will trigger auto-wire after container resolution.

```
class HelloController implements Zhwei\LaravelAutowire\AutowireAble
{
    /**
     * @autowire
     * @var \Illuminate\Contracts\Cache\Factory
     */
    protected $cache;

    public function hello()
    {
        return $this->cache->store()->get('hello');
    }
}
```

or trigger by your self:

```
$hello = new HelloController();
Zhwei\LaravelAutowire\AutowireInjector::inject(app(), $hello);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~18 days

Total

2

Last Release

2070d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f25b05f43dde32726740a058cb182bede39f67857bb2cd95941b1fd835511704?d=identicon)[zhwei](/maintainers/zhwei)

---

Top Contributors

[![zhwei](https://avatars.githubusercontent.com/u/1446459?v=4)](https://github.com/zhwei "zhwei (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

annotationautowireautowiredlaravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zhwei-laravel-autowire/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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