PHPackages                             eab-dsvenss/php-laravel-model-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. [Database &amp; ORM](/categories/database)
4. /
5. eab-dsvenss/php-laravel-model-generator

ActiveLibrary[Database &amp; ORM](/categories/database)

eab-dsvenss/php-laravel-model-generator
=======================================

Laravel model generator wrapper for generating models from db

068[3 issues](https://github.com/eab-dsvenss/php-laravel-model-generator/issues)PHP

Since Oct 11Pushed 7y agoCompare

[ Source](https://github.com/eab-dsvenss/php-laravel-model-generator)[ Packagist](https://packagist.org/packages/eab-dsvenss/php-laravel-model-generator)[ RSS](/packages/eab-dsvenss-php-laravel-model-generator/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

php-laravel-model-generator
===========================

[](#php-laravel-model-generator)

Wrapper package for laravel model generation from database using [krlove/eloquent-model-generator](https://github.com/krlove/eloquent-model-generator)

Installation
============

[](#installation)

Get package

```
composer require eab-dsvenss/php-laravel-model-generator --dev

```

Register the provider in `config/app.php`

```
'providers' => [
    // ...
    se\eab\php\laravel\modelgenerator\provider\ModelGeneratorServiceProvider::class
];

```

```
php artisan eab-modelgenerator:install

```

Usage
=====

[](#usage)

Specify models to generate in `app/config/eab-modelgeneratorconfig.php`

Specify the details for each model in `app/config/eab-modelgenerator/.php`

Call `php artisan eab-modelgenerator:generate` to generate the models specified in the config file

Configuration
=============

[](#configuration)

eab-modelgeneratorconfig.php
----------------------------

[](#eab-modelgeneratorconfigphp)

```
return [
    "outputpath" => "model",
    "namespace" => "custom\\namespace"
    "library" => "krlove/reliese/pepij",
    "models" => [
        ["name" => "Dummy",  "DummyTable">,  ["crud", "translatable"]>]
    ]
];

```

Each model can be decorated with extras. They are specified in the `extras`-array and point to files in `app/config/eab-modelgenerator/extras/.php`

The extras-file is formatted in the same way as any other modelconfig-file.

### Library

[](#library)

By specifying one or the other of `krlove` or `reliese` for the `lib` it is possible to choose which library should be used to generate the models.

If choosing `krlove` further config need to be set in the corresponding config-file for that dependency. The options and details are specified here,

If instead choosing `reliese`, the config that should be set is instead specified here,

#### Relise

[](#relise)

This automatically updates models with the date that the model was generated. If that is not desirable it is required to modify the following file `vendor/reliese/laravel/src/Coders/Model/Templates/model` by removing the dynamic date-line in the header of the file.

Model config
------------

[](#model-config)

```
return [

    "dependencies" => ["dep1","dep2"],
    "replaceables" => [
        ["pattern" => "regex", "replacement" => "replacement"]
    ],
    "removablefns" => [
        ["access" => "public", "name" => "dummyname", "content" => "dummycontent"]
    ],
    "functions" => [
 "varname",  "some value">]
    ],
    "traits" => [
        ["name" => "traitname", "dependency" => "traitname"
    ]
];

```

The replacements that occur use `preg_replace` which means that regex and replacement should be formatted according to that method's requirements.

Common Class Attributes
-----------------------

[](#common-class-attributes)

If there are attributes that should be present in all classes, specify that in `app/config/eab-modelgenerator/EABCommon.php`

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

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/b04de3e6c4ada140f11cf64ffa47ab8c3c4a7461d0a9c10a4a47382d2cce5e60?d=identicon)[eab-dsvenss](/maintainers/eab-dsvenss)

---

Top Contributors

[![eab-dsvenss](https://avatars.githubusercontent.com/u/36697891?v=4)](https://github.com/eab-dsvenss "eab-dsvenss (45 commits)")

### Embed Badge

![Health badge](/badges/eab-dsvenss-php-laravel-model-generator/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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