PHPackages                             thebinoculars/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. [Framework](/categories/framework)
4. /
5. thebinoculars/code-generator

ActiveLibrary[Framework](/categories/framework)

thebinoculars/code-generator
============================

Code generator for Laravel

v1.0(11mo ago)00MITPHPPHP ^7.2.5

Since Aug 8Pushed 11mo agoCompare

[ Source](https://github.com/thebinoculars/code-generator)[ Packagist](https://packagist.org/packages/thebinoculars/code-generator)[ RSS](/packages/thebinoculars-code-generator/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

[![Packagist Version](https://camo.githubusercontent.com/c96ff2893c15fccd7a274cfd646e507011077c8b13977e808edba547486c08c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74686562696e6f63756c6172732f636f64652d67656e657261746f72)](https://camo.githubusercontent.com/c96ff2893c15fccd7a274cfd646e507011077c8b13977e808edba547486c08c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74686562696e6f63756c6172732f636f64652d67656e657261746f72)

Code Generator for Laravel
==========================

[](#code-generator-for-laravel)

Using this package to generate controller, migration, model, route, request, resource for your Laravel application

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

[](#installation)

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

Usage
-----

[](#usage)

```
php artisan generate:code YOUR_MODEL_NAME --field "FIELD_NAME:FIELD_TYPE"
```

### Example

[](#example)

```
php artisan generate:code product --field "name:string"
```

### Custom your own templates

[](#custom-your-own-templates)

```
php artisan vendor:publish --tag=code-generator
```

- Available field types: **smallint**, **bigint**, **datetimetz**, **blob**, **integer**, **boolean**, **date**, **time**, **datetime**, **text**, **decimal**, **float**, **object**, **array**, **simple\_array**, **json\_array**, **guid**
- You can also use our `BaseService` by extending `TheBinoculars\CodeGenerator\Services\BaseService` class or create your own
- List of variables used in filename: **(XXX)** is equivalent to **.XXX** (extension) **{YYY}** is equivalent to global config variable **YYY** (defined in `config/generator`) **\[ZZZ\]** is equivalent to model form variable **ZZZ** (available values: **PLURAL\_UPPER**, **PLURAL\_LOWER**, **PLURAL\_UC**, **PLURAL\_STUDLY**, **PLURAL\_CAMEL**, **PLURAL\_KEBAB**, **PLURAL\_SNAKE**, **UPPER**, **LOWER**, **UC**, **STUDLY**, **CAMEL**, **KEBAB**, **SNAKE**)
- You can also use model form variables and global config variables in templates

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance52

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

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

330d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25414276?v=4)[The Binoculars](/maintainers/thebinoculars)[@thebinoculars](https://github.com/thebinoculars)

---

Tags

laravelgenerator

### Embed Badge

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

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M307](/packages/laravel-horizon)[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M201](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

43411.2k](/packages/venturedrake-laravel-crm)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k13](/packages/laravel-surveyor)

PHPackages © 2026

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