PHPackages                             kksoftwareag/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. kksoftwareag/laravel-model-generator

ActiveLibrary

kksoftwareag/laravel-model-generator
====================================

Fork of Reliese Components for Laravel Framework code generation.

2.0.0(6y ago)11971[1 PRs](https://github.com/kksoftwareag/laravel-model-generator/pulls)MITPHPPHP &gt;=7.3.0

Since Oct 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/kksoftwareag/laravel-model-generator)[ Packagist](https://packagist.org/packages/kksoftwareag/laravel-model-generator)[ Docs](https://kk-software.de)[ RSS](/packages/kksoftwareag-laravel-model-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (9)Versions (18)Used By (0)

Reliese Laravel
===============

[](#reliese-laravel)

[![Build Status](https://camo.githubusercontent.com/75a37c54873baf32f28801bc9891141f1e95f3f21c771bc9966aebe379733fec/68747470733a2f2f7472617669732d63692e636f6d2f6b6b736f66747761726561672f6c61726176656c2d6d6f64656c2d67656e657261746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/kksoftwareag/laravel-model-generator)[![Latest Stable Version](https://camo.githubusercontent.com/29b93f3d07ccd61198a2364a2e6df9f35a49a87b4e0207789c86e1d9e4338cf1/68747470733a2f2f706f7365722e707567782e6f72672f6b6b736f66747761726561672f6c61726176656c2d6d6f64656c2d67656e657261746f722f762f737461626c65)](https://packagist.org/packages/kksoftwareag/laravel-model-generator)[![Total Downloads](https://camo.githubusercontent.com/981b0acaffe2d62bae779d58191392955713b4fa64f6620230f4f775bbe95916/68747470733a2f2f706f7365722e707567782e6f72672f6b6b736f66747761726561672f6c61726176656c2d6d6f64656c2d67656e657261746f722f646f776e6c6f616473)](https://packagist.org/packages/kksoftwareag/laravel-model-generator)[![Latest Unstable Version](https://camo.githubusercontent.com/71fa021faf8ca4280bbe0359df576bdce8793d33e9fd3c7f28fdbf3421b95245/68747470733a2f2f706f7365722e707567782e6f72672f6b6b736f66747761726561672f6c61726176656c2d6d6f64656c2d67656e657261746f722f762f756e737461626c65)](https://packagist.org/packages/kksoftwareag/laravel-model-generator)[![License](https://camo.githubusercontent.com/c9da862effaedba8d083e3d8d7e168309afa170f5cb1310502da05adb1d589d4/68747470733a2f2f706f7365722e707567782e6f72672f6b6b736f66747761726561672f6c61726176656c2d6d6f64656c2d67656e657261746f722f6c6963656e7365)](https://packagist.org/packages/kksoftwareag/laravel-model-generator)

Reliese Laravel is a collection of Laravel Components which aim is to help the development process of Laravel applications by providing some convenient code-generation capabilities.

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 `reliese/laravel` package via composer:

```
composer require reliese/laravel
```

### Configuration

[](#configuration)

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

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

    Reliese\Coders\CodersServiceProvider::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 reliese/laravel --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(\Reliese\Coders\CodersServiceProvider::class);
    }
}
```

Models
------

[](#models)

[![Generating models with artisan](https://camo.githubusercontent.com/8af580d8f73d315bdc934e57daa3356827ca0175678bddaa35b13e5411f3b5da/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a684f613251784f5245327a794f5f2d5a714a343073412e706e67 "Making artisan code my Eloquent models")](https://camo.githubusercontent.com/8af580d8f73d315bdc934e57daa3356827ca0175678bddaa35b13e5411f3b5da/68747470733a2f2f63646e2d696d616765732d312e6d656469756d2e636f6d2f6d61782f3830302f312a684f613251784f5245327a794f5f2d5a714a343073412e706e67)

Add the `models.php` configuration file to your `config` directory and clear the config cache:

```
php artisan vendor:publish --tag=reliese-models
php artisan config:clear
```

### Usage

[](#usage)

Assuming you have already configured your database, you are now all set to go.

- Let's scaffold some of your models from your default connection.

```
php artisan code:models
```

- You can scaffold a specific table like this:

```
php artisan code:models --table=users
```

- You can also specify the connection:

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

- If you are using a MySQL database, you can specify which schema you want to scaffold:

```
php artisan code:models --schema=shop
```

### Customizing Model Scaffolding

[](#customizing-model-scaffolding)

To change the scaffolding behaviour you can make `config/models.php` configuration file fit your database needs. [Check it out](https://github.com/reliese/laravel/blob/master/config/models.php) ;-)

### Tips

[](#tips)

#### 1. Keeping model changes

[](#1-keeping-model-changes)

You may want to generate your models as often as you change your database. In order not to lose you own model changes, you should set `base_files` to `true` in your `config/models.php`.

When you enable this feature your models will inherit their base configurations from base models. You should avoid adding code to your base models, since you will lose all changes when they are generated again.

> Note: You will end up with two models for the same table and you may think it is a horrible idea to have two classes for the same thing. However, it is up to you to decide whether this approach gives value to your project :-)

#### Support

[](#support)

For the time being, this package only supports MySQL databases. Support for other databases will be added soon.

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~286 days

Total

16

Last Release

2262d ago

Major Versions

v0.0.14 → 1.0.02019-12-13

1.0.0 → 2.0.02020-02-27

PHP version history (3 changes)v0.0.1PHP &gt;=5.6.4

1.0.0PHP &gt;=7.2.0

2.0.0PHP &gt;=7.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/16a2b2ee856e671b3036956f7281045f5d8eddc49b00764411629d6bc016c93f?d=identicon)[WebsiteDeveloper](/maintainers/WebsiteDeveloper)

---

Top Contributors

[![CristianLlanos](https://avatars.githubusercontent.com/u/6595277?v=4)](https://github.com/CristianLlanos "CristianLlanos (54 commits)")[![WebsiteDeveloper](https://avatars.githubusercontent.com/u/2150814?v=4)](https://github.com/WebsiteDeveloper "WebsiteDeveloper (26 commits)")[![DamienBurkeJJ](https://avatars.githubusercontent.com/u/29195729?v=4)](https://github.com/DamienBurkeJJ "DamienBurkeJJ (12 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (9 commits)")[![rwdim](https://avatars.githubusercontent.com/u/416537?v=4)](https://github.com/rwdim "rwdim (8 commits)")[![boukeversteegh](https://avatars.githubusercontent.com/u/53926?v=4)](https://github.com/boukeversteegh "boukeversteegh (6 commits)")[![anurbol](https://avatars.githubusercontent.com/u/3603448?v=4)](https://github.com/anurbol "anurbol (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![myusuf5400](https://avatars.githubusercontent.com/u/11193088?v=4)](https://github.com/myusuf5400 "myusuf5400 (5 commits)")[![timhaak](https://avatars.githubusercontent.com/u/271607?v=4)](https://github.com/timhaak "timhaak (4 commits)")[![jefhar](https://avatars.githubusercontent.com/u/22824070?v=4)](https://github.com/jefhar "jefhar (3 commits)")[![OmarRobinson](https://avatars.githubusercontent.com/u/16844791?v=4)](https://github.com/OmarRobinson "OmarRobinson (2 commits)")[![bassco](https://avatars.githubusercontent.com/u/2122685?v=4)](https://github.com/bassco "bassco (2 commits)")[![jampot5000](https://avatars.githubusercontent.com/u/932691?v=4)](https://github.com/jampot5000 "jampot5000 (2 commits)")[![pozhidaevak](https://avatars.githubusercontent.com/u/1496874?v=4)](https://github.com/pozhidaevak "pozhidaevak (1 commits)")[![delmicio](https://avatars.githubusercontent.com/u/2908209?v=4)](https://github.com/delmicio "delmicio (1 commits)")[![angujo](https://avatars.githubusercontent.com/u/9949636?v=4)](https://github.com/angujo "angujo (1 commits)")[![acousticksan](https://avatars.githubusercontent.com/u/2283454?v=4)](https://github.com/acousticksan "acousticksan (1 commits)")[![Omranic](https://avatars.githubusercontent.com/u/406705?v=4)](https://github.com/Omranic "Omranic (1 commits)")

---

Tags

laravelmodelreliesekksoftwarekksoftwareag

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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