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

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

smartymoon/generator
====================

Generate files to save time

3268PHP

Since Jul 14Pushed 4y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel 文件自动生成工具
================

[](#laravel-文件自动生成工具)

安装
--

[](#安装)

`composer require smartymoon/generator --dev`

打开  即可使用

一览
--

[](#一览)

[![Snipaste_2021-07-14_10-30-17](https://user-images.githubusercontent.com/12489528/125551336-0bfb6ed5-0c4c-4e67-969a-42a13975140a.png)](https://user-images.githubusercontent.com/12489528/125551336-0bfb6ed5-0c4c-4e67-969a-42a13975140a.png)

项目由来
----

[](#项目由来)

做过的开发越多越能发现大量的时间都用在了重复性的工作上。比如创建 Model Migration Controller 这类文件，它们有极高的雷同性。作为程序员，我们需要把宝贵的时间放在业务上，重复性的工作交给软件自动生成就好。Laravel 官方明显意识到这点 `php artisan make` 系列命令提供了很多方便。但毕竟千人千面，官方只能提供最基数的内容，显然这满足不了个性化需求

网络上有很多类似的自动生成工具，每发现一个我都如获至宝，遗憾的是深入了解后都不适用自己的情况。于是便萌生子自己造轮子的想法，好处也显而易见，随着知识的积累与技术的发展，我可以轻松升级生成工具，让它分分钟生成我想要的东西

特性
--

[](#特性)

- 有 blade api Inertia 三种模板
- 支持模块化, 让模型更有条理 /App/Models/House/Rent.php
- 支持汉字友好的假数据生成
- 浏览器表单操作，方便简单
- 浏览器实时保存数据，即使中途刷新，数据也不会丢
- 每次生成文件自动 git commit，方便回滚
- 支持 Enum 自动生成, 依赖 spatie laravel-enum

使用建议
----

[](#使用建议)

我深知每个团队的规范都不同，我的习惯和你的大概率是不同的。所以建议 Fork 后二次加工成适合自己的模板

希望你能给我一个 Star ，感谢

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

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.

### Community

Maintainers

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

---

Top Contributors

[![smartymoon](https://avatars.githubusercontent.com/u/12489528?v=4)](https://github.com/smartymoon "smartymoon (9 commits)")

### Embed Badge

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

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

PHPackages © 2026

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