PHPackages                             lvxiaolin/autocode - 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. [Database &amp; ORM](/categories/database)
4. /
5. lvxiaolin/autocode

ActiveLibrary[Database &amp; ORM](/categories/database)

lvxiaolin/autocode
==================

It is convenient and quick to use ORM mode to program and automatically generate and update get and set methods.

0.0.3(6y ago)16Apache-2.0PHP

Since Aug 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/lvxiaolin/autocode)[ Packagist](https://packagist.org/packages/lvxiaolin/autocode)[ RSS](/packages/lvxiaolin-autocode/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

欢迎使用 基于TP5的代码生成器 **autocode**
=============================

[](#欢迎使用-基于tp5的代码生成器-autocode)

我认为，你是一个代码艺术家，你追求代码的抽象和便捷的代码导航。 在此之前，在一些WEB开发中，你需要时不时翻阅数据库建表语句来寻找和确定字段，否则就有可能写错字段。比如：

```
if($User->password == md5($this->getParam('password'))){
    //登录成功
}
```

你可能一不小心，`$User->password` 写错成了 `$User->pass`

```
//$User->password 写成了 $User->pass 导致BUG
if($User->pass == md5($this->getParam('password'))){
    //登录成功
}
```

你为此感到苦恼，你认为你的IDE不够智能。 **autocode 代码生成器** 解决了这个问题，让你码代码时，不再需要去翻阅数据库确认字段。像这样： [![screenshot](https://camo.githubusercontent.com/930c5539b7f5fb4e6d661f5f3b82db02896b0b28f798529a62231bd6702f640e/68747470733a2f2f7777772e69706d74616c6b2e636f6d2f7075626c69632f75706c6f6164732f32303139303832312f35663230343765326162626338323530656161646363383036613263353739662e706e67)](https://camo.githubusercontent.com/930c5539b7f5fb4e6d661f5f3b82db02896b0b28f798529a62231bd6702f640e/68747470733a2f2f7777772e69706d74616c6b2e636f6d2f7075626c69632f75706c6f6164732f32303139303832312f35663230343765326162626338323530656161646363383036613263353739662e706e67)

如何安装呢？
------

[](#如何安装呢)

> 1. 安装 *autocode*： `composer require lvxiaolin/autocode `

> 2. 生成或更新 *get*、*set* 代码： `php think autocode:update`

到这里就已经完成了，如果你对以前写的 `$User->password` 想统一改成 `$User->getPassword()`

> 3. 替换在此之前的属性写法为方法写法 *(application代表应用目录)*`php think autocode:replace -d application`

遇到问题？
-----

[](#遇到问题)

感谢你的使用和反馈。 Thank you for your use and look forward to your feedback.

*Author：LvXiaolin *

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

2461d ago

### Community

Maintainers

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

---

Top Contributors

[![lvxiaolin](https://avatars.githubusercontent.com/u/15043334?v=4)](https://github.com/lvxiaolin "lvxiaolin (10 commits)")

### Embed Badge

![Health badge](/badges/lvxiaolin-autocode/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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