PHPackages                             trannguyenhan/autogencontroller - 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. trannguyenhan/autogencontroller

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

trannguyenhan/autogencontroller
===============================

Auto gen controller code

v1(4y ago)28MITPHP

Since Apr 16Pushed 3y ago1 watchersCompare

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

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

Auto gen controller Laravel
===========================

[](#auto-gen-controller-laravel)

[![](https://camo.githubusercontent.com/ff02edc5e17f188736dc6843fe870614dbec23e48c1c7ccd7a29020f300c8d17/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d49542532302d4c6963656e73652d627269676874677265656e)](https://camo.githubusercontent.com/ff02edc5e17f188736dc6843fe870614dbec23e48c1c7ccd7a29020f300c8d17/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d49542532302d4c6963656e73652d627269676874677265656e)

For each person and each project will bring a different code structure, each person likes and has their own style, this project does not help you to create really good controllers, but it can be a foundation. so you can create your own better versions by making changes in the templates folder

Configuration
-------------

[](#configuration)

Install via composer ([packagist](https://packagist.org/packages/trannguyenhan/autogencontroller)):

```
composer require trannguyenhan/autogencontroller
```

Usage
-----

[](#usage)

Gen controller and repository with command:

```
php artisan tnhgen:controller
```

If your controller extends orther Class without Controller or your repository extends other Class without BaseRepository add parameter when gen controller:

```
php artisan tnhgen:controller --basecontroller YourController --baserepository YourRepository
```

If you want assign model corresponding with controller use under parameter:

```
php artisan tnhgen:controller --model YourModel
```

If controller within a namespace, add parameter:

```
php artisan tnhgen:controller --namespace YourNamespace
```

and of course, you can combine all the above parameters at once. If you want gen model from MySQL database, PostgreSQL and SQLite, you can follow repository

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

1486d ago

### Community

Maintainers

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

---

Top Contributors

[![trannguyenhan](https://avatars.githubusercontent.com/u/57361682?v=4)](https://github.com/trannguyenhan "trannguyenhan (8 commits)")

---

Tags

auto-generatorphpphp-package

### Embed Badge

![Health badge](/badges/trannguyenhan-autogencontroller/health.svg)

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

###  Alternatives

[chenkby/yii2-region

Yii2中国省市区三级联动

325.1k](/packages/chenkby-yii2-region)

PHPackages © 2026

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