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

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

anhnguyen02/code-generator
==========================

Laravel CRUD code generation support package.

v1.0.1(2y ago)061MITPHPPHP &gt;=7.0|^8.0|^8.1

Since Oct 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/anhnguyen02/tool-crud-generator)[ Packagist](https://packagist.org/packages/anhnguyen02/code-generator)[ RSS](/packages/anhnguyen02-code-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

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

[](#installation)

To get started, you should add the `anhnguyen02/code-generator` Composer dependency to your project:

```
composer require anhnguyen02/code-generator --dev

```

Currently only laravel 10.x is supported

Usage
-----

[](#usage)

#### Create CURD api

[](#create-curd-api)

```
php artisan crud:api music MusicController --api --requests --middleware="['api']"

```

When you run the above command, you will either receive a confirmation or be prompted for assistance with the next steps. Alternatively, you can also use a combination of the command options below to bypass the need for support.

#### Creat controller:

[](#creat-controller)

```
php artisan crud:controller PostController --model=Post

```

###### Options:

[](#options)

```
['api':  'Exclude the create and edit methods from the controller']
['type': 'Manually specify the controller stub file to use']
['force': 'Create the class even if the controller already exists']
['invokable': 'Generate a single method, invokable controller class']
['model': 'Generate a resource controller for the given model']
['parent': 'Generate a nested resource controller class']
['resource': 'Generate a resource controller class']
['requests': 'Generate FormRequest classes for store and update']
['singleton': 'Generate a singleton resource controller class']
['creatable': 'Indicate that a singleton resource should be creatable']
```

#### Create model:

[](#create-model)

```
php artisan crud:model Post --fillable="['title', 'body']"

```

###### Options:

[](#options-1)

```
['all': 'Generate a migration classes for the model'],
['migration': 'Create a new migration file for the model'],
['soft-deletes': 'Enable soft deletes for a model'],
['has-uuids': 'Use a UUID key instead of an auto-incrementing integer key'],
['fillable': 'The names of the fillable columns'],
['pk': 'The name of the primary key'],
['relationships': 'The relationships for the model'],
['force': 'Overwrite model file content'],
# If you want to create migration
['schema': 'The name of the schema'],
['indexes': 'The fields to add an index to'],
['foreign-keys': 'Foreign keys'],
```

#### Create migration:

[](#create-migration)

```
php artisan crud:migration posts --schema="title#string; body#text"

```

###### Options:

[](#options-2)

```
['schema': 'The name of the schema'],
['indexes': 'The fields to add an index to'],
['foreign-keys': 'Foreign keys'],
['pk': 'The name of the primary key'],
['soft-deletes': 'Include soft deletes fields'],
```

**Migration Field Types:**

- string
- char
- varchar
- date
- datetime
- time
- timestamp
- text
- mediumtext
- longtext
- json
- jsonb
- binary
- integer
- bigint
- mediumint
- tinyint
- smallint
- boolean
- decimal
- double
- float
- enum

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

952d ago

### Community

Maintainers

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

---

Top Contributors

[![anhnv02](https://avatars.githubusercontent.com/u/71773045?v=4)](https://github.com/anhnv02 "anhnv02 (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)
