PHPackages                             daniloesser/laravel-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. [CLI &amp; Console](/categories/cli)
4. /
5. daniloesser/laravel-generator

ActiveLibrary[CLI &amp; Console](/categories/cli)

daniloesser/laravel-generator
=============================

Laravel Generator: Automatically generate Laravel Framework files from a CLI command.

811PHPCI failing

Since Jun 13Pushed 2y ago4 watchersCompare

[ Source](https://github.com/daniloesser/laravel-generator)[ Packagist](https://packagist.org/packages/daniloesser/laravel-generator)[ RSS](/packages/daniloesser-laravel-generator/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Generator
=================

[](#laravel-generator)

The Laravel Generator is a Laravel CLI command which aim is to help the development process of Laravel applications by providing some convenient code-generation capabilities.

At the moment, this package is capable of generating the following:

- **Models** - with eloquent relations
- **Migrations** - with custom field types and foreign keys relations
- **Factories** - with proper faker types
- **Seeders**

This package was forked from **reliese/laravel** and it was improved to support more features. Also, I'm using the package **kitloong/laravel-migrations-generator** to support migration generation.

How does it work?
-----------------

[](#how-does-it-work)

This package expects that you are using Laravel 5.1 or above. You will need to import the `daniloesser/laravel-generator` package via composer:

```
composer require daniloesser/laravel-generator
```

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

[](#configuration)

Add the service provider to your `config/app.php` file within the `providers` key:

```
// ...
'providers' => [
    /*
     * Package Service Providers...
     */

    CliGenerator\Code\CodeServiceProvider::class,
],
// ...
```

### Configuration for local environment only

[](#configuration-for-local-environment-only)

If you wish to enable generators only for your local environment, you should install it via composer using the --dev option like this:

```
composer require daniloesser/laravel-generator --dev
```

Then you'll need to register the provider in `app/Providers/AppServiceProvider.php` file.

```
public function register()
{
    if ($this->app->environment() == 'local') {
        $this->app->register(\CliGenerator\Code\CodeServiceProvider::class);
    }
}
```

### Custom configuration

[](#custom-configuration)

Add the `cli-generator.php` configuration file to your `config` directory and clear the config cache:

```
php artisan vendor:publish --tag=cli-generator
php artisan config:clear
```

Usage
-----

[](#usage)

- Invoke the generator:

```
php artisan code:generate
```

- You can also specify the connection:

```
php artisan code:generate --connection=mysql
```

- You will be prompted for which tables you want to scaffold from a list. You can pass more than one, separating them by a comma:

```
E.G: cities,states,countries
```

- Additionally, you can inform a Model sub-folder to create the files in a specific folder/namespace:

```
E.G: Payment
```

- After finishing Models generation, you will be prompted for migrations and factories generation as well.

Support
-------

[](#support)

For now, this package only supports MySQL databases.

Some customization is possible. Just check options inside cli-generator file.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity24

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/340cab1edcdac04b9f41f48fffc4504651bdbb46ad905f1ea7ff674426e64cd0?d=identicon)[daniloesser](/maintainers/daniloesser)

---

Top Contributors

[![daniloesser](https://avatars.githubusercontent.com/u/1929806?v=4)](https://github.com/daniloesser "daniloesser (21 commits)")

### Embed Badge

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

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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