PHPackages                             pimsolutions/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. [Framework](/categories/framework)
4. /
5. pimsolutions/laravel-model-generator

ActiveLibrary[Framework](/categories/framework)

pimsolutions/laravel-model-generator
====================================

Components for Laravel Framework code generation.

v1.2.2(3y ago)0156MITPHPPHP ^7.3|^8.0

Since Apr 18Pushed 3y agoCompare

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

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

Reliese Laravel Model Generator
===============================

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

Reliese Laravel Model Generator aims to speed up the development process of Laravel applications by providing some convenient code-generation capabilities. The tool inspects your database structure, including column names and foreign keys, in order to automatically generate Models that have correctly typed properties, along with any relationships to other Models.

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 `pimsolutions/laravel-model-generator` package via composer:

### Configuration

[](#configuration)

It is recommended that this package should only be used on a local environment for security reasons. You should install it via composer using the --dev option like this:

```
composer require pimsolutions/laravel-model-generator --dev
```

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

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

# Let's refresh our config cache just in case
php artisan config:clear
```

Models
------

[](#models)

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

### 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/pimsolutions/laravel-model-generator/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 your 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 supports MySQL, PostgreSQL and SQLite databases. Support for other databases are encouraged to be added through pull requests.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

Total

2

Last Release

1117d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cef20f3bc62c83c645d912245274905e073f357a48823fa85675317397790ec4?d=identicon)[pimsolutions](/maintainers/pimsolutions)

---

Top Contributors

[![CristianLlanos](https://avatars.githubusercontent.com/u/6595277?v=4)](https://github.com/CristianLlanos "CristianLlanos (76 commits)")[![coatesap](https://avatars.githubusercontent.com/u/1926626?v=4)](https://github.com/coatesap "coatesap (20 commits)")[![finiteinfinity](https://avatars.githubusercontent.com/u/51374185?v=4)](https://github.com/finiteinfinity "finiteinfinity (18 commits)")[![DamienBurkeJJ](https://avatars.githubusercontent.com/u/29195729?v=4)](https://github.com/DamienBurkeJJ "DamienBurkeJJ (12 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)")[![pimsolutions](https://avatars.githubusercontent.com/u/131163478?v=4)](https://github.com/pimsolutions "pimsolutions (6 commits)")[![myusuf5400](https://avatars.githubusercontent.com/u/11193088?v=4)](https://github.com/myusuf5400 "myusuf5400 (5 commits)")[![anurbol](https://avatars.githubusercontent.com/u/3603448?v=4)](https://github.com/anurbol "anurbol (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)")[![antriver](https://avatars.githubusercontent.com/u/251159?v=4)](https://github.com/antriver "antriver (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)")[![OmarRobinson](https://avatars.githubusercontent.com/u/16844791?v=4)](https://github.com/OmarRobinson "OmarRobinson (2 commits)")[![mvd81](https://avatars.githubusercontent.com/u/5435962?v=4)](https://github.com/mvd81 "mvd81 (2 commits)")[![nasatome](https://avatars.githubusercontent.com/u/18271791?v=4)](https://github.com/nasatome "nasatome (2 commits)")[![nhoemchenda](https://avatars.githubusercontent.com/u/4487888?v=4)](https://github.com/nhoemchenda "nhoemchenda (2 commits)")[![tpaksu](https://avatars.githubusercontent.com/u/3295?v=4)](https://github.com/tpaksu "tpaksu (1 commits)")[![angujo](https://avatars.githubusercontent.com/u/9949636?v=4)](https://github.com/angujo "angujo (1 commits)")

---

Tags

laravel model generatorpimsolutions

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M528](/packages/laravel-passport)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M106](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M597](/packages/laravel-ui)[laravel/pennant

A simple, lightweight library for managing feature flags.

57311.1M53](/packages/laravel-pennant)[laravel/ai

The official AI SDK for Laravel.

732506.3k60](/packages/laravel-ai)

PHPackages © 2026

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