PHPackages                             linphp/generator - 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. linphp/generator

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

linphp/generator
================

基于thinkphp6写的PHP逻辑层,模型层,控制器层自动生成文件think脚本

2.2(2y ago)719511MITPHPPHP &gt;=7.1.0

Since Sep 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BlueOfTheSea/Linphp-Generator)[ Packagist](https://packagist.org/packages/linphp/generator)[ RSS](/packages/linphp-generator/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (3)Versions (14)Used By (1)

Linphp PHP Generator
====================

[](#linphp-php-generator)

Installation
------------

[](#installation)

```
composer require linphp/generator

```

generator --thinkphp v6.0.3 插件
------------------------------

[](#generator-----thinkphp-v603-插件)

```

    每次执行命令除了app/model会初始化外,别的文件夹不用担心会初始化,已有文件不会初始化。
    如果在linux上操作权限一定要给足,如果无法创建文件请检查用户权限
    遇到问题,如有宝贵的建议邮箱联系我哦。
    email： ymdhis@163.com
命令1.  php think gen index  #根据数据表生成所有controller,service,model,的文件。
命令2.  php think gen index@user #生成 index模块下的 user控制器文件 userService文件,model文件，
命令3.  php think gen  #如果有修改数据表操作请执行此命令,重构app/model映射文件夹,保证映射表关系。
提示:
    1.执行命令前请配置好数据库,保证能正确连接。
    2.生成文件说明
        |--app
            |--index
                 |--controller #自动生成的控制器文件
                 |--model #自动生成的模型,sql语句可以在这里写。
                 |--service #自动生成的逻辑层代码,
            |--model  #此文件夹禁止修改文件
                 |--entity #自动生成的映射模型,此文件夹下文件是对应所有数据表中的映射模型,禁止写入代码,每次使用php think gen index或index@user会重构结构表
                 |--common #此文件夹不会初始化,可以创建文件夹,文件与编写代码
                     |--BaseEntity.php  #处理公共Entity文件
    3.如果表注释前边加. 使用php think gen index命令时注解的表不会被生成,
    例如：
        a_user 表            表注解  .用户表
        a_user_admin 表      表注解   管理员表
        a_user_sex   表      表注解   .性别表

    a_user以及a_user_sex不会生成controller,model,service文件但是model\entity实体模型会自动生成只需要new这里边的类即可
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

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 ~98 days

Recently: every ~211 days

Total

13

Last Release

899d ago

Major Versions

1.9 → 2.02021-08-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28618819?v=4)[houlinlin](/maintainers/houlinlin)[@Houlinlin](https://github.com/Houlinlin)

---

Top Contributors

[![BlueOfTheSea](https://avatars.githubusercontent.com/u/37655407?v=4)](https://github.com/BlueOfTheSea "BlueOfTheSea (27 commits)")

### Embed Badge

![Health badge](/badges/linphp-generator/health.svg)

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

###  Alternatives

[crescat-io/saloon-sdk-generator

Simplified SDK Scaffolding for Saloon

13130.9k7](/packages/crescat-io-saloon-sdk-generator)[craftcms/generator

Craft CMS component generator

88377.0k38](/packages/craftcms-generator)[beacon-hq/bag

A comprehensive immutable value objects implementation

1789.1k3](/packages/beacon-hq-bag)[okapi/aop

PHP AOP is a PHP library that provides a powerful Aspect Oriented Programming (AOP) implementation for PHP.

3812.0k](/packages/okapi-aop)[grifart/scaffolder

Class scaffolder. Write definition, generate simple value holders. Useful for trivial composite types used in event sourced applications - for commands, events and query definitions classes. This mostly supplements public readonly $properties

1017.7k2](/packages/grifart-scaffolder)

PHPackages © 2026

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