PHPackages                             lucasandre-dev/laravel-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. lucasandre-dev/laravel-code-generator

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

lucasandre-dev/laravel-code-generator
=====================================

Code generator from templates

2.0.2(1y ago)1765MITPHP

Since Jun 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lucasandre-dev/laravel-code-generator)[ Packagist](https://packagist.org/packages/lucasandre-dev/laravel-code-generator)[ RSS](/packages/lucasandre-dev-laravel-code-generator/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (8)Used By (0)

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

[](#laravel-code-generator)

A simple code generator for Laravel projects to streamline development.

🚀 Installation and Configuration
--------------------------------

[](#-installation-and-configuration)

1. **Install via Composer**

    ```
    composer require lucasandre-dev/laravel-code-generator
    ```
2. **Publish the Service Provider**Register the service provider in your `config/app.php` file:

    ```
    'providers' => [
        // Other Service Providers...
        LucasandreDev\LaravelCodeGenerator\Providers\CodeGeneratorProvider::class,
    ],
    ```

    > **Note:**
    > For Laravel versions &lt;= 10: [Registering Providers in Laravel 10](https://laravel.com/docs/10.x/providers#registering-providers)
    > For Laravel versions &gt;= 11: [Registering Providers in Laravel 11](https://laravel.com/docs/11.x/providers#registering-providers)
3. **Publish Configuration and Mockups**

    - **Config File:**```
        php artisan vendor:publish --tag=templates-code-generator-config
        ```
    - **Mockups:**```
        php artisan vendor:publish --tag=templates-code-generator-mockups
        ```
4. **Add Filesystem Configuration**Add the following configuration to `config/filesystems.php`:

    ```
    'templates' => [
        'driver' => 'local',
        'root' => base_path(),
        'throw' => true,
    ],
    ```
5. **Configure Template Generator**Modify the configuration in `config/templates-code-generator.php` to suit your needs.
6. **Run Code Generation Command**Execute the following command to generate code:

    ```
    php artisan code:generate
    ```

    > **Note:**
    > When running the command, you'll be prompted to provide an entity name and a template name.

📚 Documentation
---------------

[](#-documentation)

### 🔧 Configuration File (`config/templates-code-generator.php`)

[](#-configuration-file-configtemplates-code-generatorphp)

- **disk:** Disk used for storing generated files.
- **base\_destination:** Base path for all generated files.
- **template\_default:** Default template used by the command to generate code.
- **templates:** List of templates with operations, template locations, and final dynamic destinations.

### 📑 Templates

[](#-templates)

**Replacements:**

- `%EntityNamespace%`: Recommended usage in the mockups namespace.
- `%PascalCase%`: The entity name in PascalCase format.
- `%camelCase%`: The entity name in camelCase format.

### 🛠️ Artisan Commands

[](#️-artisan-commands)

#### `code:generate`

[](#codegenerate)

**Options:**

- `--force`: Force overwrite of existing files (use with caution).

**Prompts:**

- **Entity:** Name of the entity to be created. Allows subpaths (e.g., `Path1/Path2/EntityName`).
- **Template:** Select a template number from the options suggested in the terminal.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Recently: every ~16 days

Total

7

Last Release

687d ago

Major Versions

1.0.3 → 2.0.02024-08-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/91839221?v=4)[Lucas André](/maintainers/lucasandre-dev)[@lucasandre-dev](https://github.com/lucasandre-dev)

---

Top Contributors

[![lucasandre-dev](https://avatars.githubusercontent.com/u/91839221?v=4)](https://github.com/lucasandre-dev "lucasandre-dev (13 commits)")

### Embed Badge

![Health badge](/badges/lucasandre-dev-laravel-code-generator/health.svg)

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

###  Alternatives

[brunocanada/hreflang

This Magento 2 multi store extension adds the alternate hreflang tag for: Pages, Product and Category.

2169.3k](/packages/brunocanada-hreflang)

PHPackages © 2026

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