PHPackages                             cwssrl/eloquent-lumen-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. cwssrl/eloquent-lumen-generator

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

cwssrl/eloquent-lumen-generator
===============================

Eloquent Lumen Generator

1.0.0(6y ago)9110MITPHPPHP ~7.2CI failing

Since Sep 26Pushed 6y ago7 watchersCompare

[ Source](https://github.com/cwssrl/eloquent-lumen-generator)[ Packagist](https://packagist.org/packages/cwssrl/eloquent-lumen-generator)[ RSS](/packages/cwssrl-eloquent-lumen-generator/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (6)Versions (17)Used By (0)

Eloquent Lumen Generator
========================

[](#eloquent-lumen-generator)

Eloquent Lumen Generator is a tool based on [Code Generator](https://github.com/cwssrl/code-generator) for generating Eloquent models. It comes with the possibility to generate the following items:

- Model;
- Repository and Contracts, binding them into the bootstrap/app.php file;
- Api Controller;
- Routes;
- Resources;
- Translation management for tables. It manages MySql and PostgreSql as database.

Requirements
------------

[](#requirements)

To make this package works you have to make your migrations and run them. All the package will create items based on the table that it can find on the database set on your .env file.

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

[](#installation)

Step 1. Add Eloquent Lumen Generator to your project:

```
composer require cwssrl/eloquent-lumen-generator --dev

```

Step 2. Register `GeneratorServiceProvider` in bootstrap/app.php file:

```
$app->register(Cws\EloquentModelGenerator\Provider\GeneratorServiceProvider::class);
```

Step 3. Uncomment AppServiceProvider in bootstrap/app.php file:

Step 4 (optional). If you want to edit package configurations, you have to copy vendor/cwssrl/eloquent-lumen-generator/src/Resources/eloquent\_model\_generator.php into your config folder.

Usage
-----

[](#usage)

Use

```
php artisan cws:generate Book --all-api

```

to generate all you need for the Book class. Generator will look for table with name `books` and generate the model, the repo, the contract, the controller, the routes for it.

You can also generate data for all your tables at once

```
php artisan cws:generate all --all-api

```

### Valid options

[](#valid-options)

You can use these options as command parameters

OptionDescriptiontable-nameSet the table name generator has to use generating your model (e.g. "cws:generate Test --table-name=hello" will use table named "hello" to generate model "Test"). It can be used only when one model a time is created.output-pathSet the path name generator has to use saving your model relative to app folder (e.g. "cws:generate Test --output-path=hello" will save your model "Test" in app/hello folder).namespaceSet the namespace name generator has to use generating your model (e.g. "cws:generate Test --namespace=hello" will use namespace "hello" to generate model "Test").base-class-nameSet which class will extends your model (e.g. "cws:generate Test --base-class-name=hello" will extends "hello" class generating "Test").no-timestampsSet timestamps property to falsedate-formatdateFormat propertyconnectionconnection propertyexcept-tablesTables to not process separated by ","api-resourceCreates api resource toorepositoryCreates repository tooapi-controllerCreates api controller tooapi-routesCreates api routes tooapi-routes-pathSet the path where find api route file (default api.php)all-apiCreate all objects related to api, models and repos includedContributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Credits
-------

[](#credits)

- [Samuele Salvatico](https://www.linkedin.com/in/samuele-salvatico-89527464/)
- [Andrea Romanello](https://www.linkedin.com/in/andrea-romanello/)

This package is heavily based on [Cws Code Generator](https://github.com/cwssrl/code-generator) that is a fork of the [krlove/code-generator](https://github.com/krlove/code-generator) package

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 69% 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 ~9 days

Total

13

Last Release

2359d ago

Major Versions

0.0.12 → 1.0.02020-01-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f054791dd25f449ec129231dec3beb191c471e87bb5f8d5df14390ca4ca74a2?d=identicon)[cwssrl](/maintainers/cwssrl)

---

Top Contributors

[![SamSalvatico](https://avatars.githubusercontent.com/u/40636569?v=4)](https://github.com/SamSalvatico "SamSalvatico (136 commits)")[![krlove](https://avatars.githubusercontent.com/u/1562405?v=4)](https://github.com/krlove "krlove (32 commits)")[![rommelandrea](https://avatars.githubusercontent.com/u/234780?v=4)](https://github.com/rommelandrea "rommelandrea (21 commits)")[![mlacatusu1997](https://avatars.githubusercontent.com/u/68667983?v=4)](https://github.com/mlacatusu1997 "mlacatusu1997 (8 commits)")

---

Tags

lumenphpscaffoldinggeneratorlumencws

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/cwssrl-eloquent-lumen-generator/health.svg)

```
[![Health](https://phpackages.com/badges/cwssrl-eloquent-lumen-generator/health.svg)](https://phpackages.com/packages/cwssrl-eloquent-lumen-generator)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k116.2M677](/packages/symfony-maker-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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