New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

airsane/laravel_model_generator

Reliese Components for Laravel Framework code generation.
1,152

Larablocks Analysis

airsane/laravel_model_generator works with Laravel 5 to 11 (latest release v1.0.2, Feb 10, 2025), all past end of life (the last on Mar 12, 2026): no more fixes, even for security.

Recommendation checks

Use with care

Use with care: meets 0 of 4 checks.

  • Supports only Laravel 5 to 11, past end of life since Mar 12, 2026
  • No release in the last 12 months (last: Feb 10, 2025)
  • 228 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Quiet
  • Last stable release: Feb 10, 2025.
  • No releases in the last 12 months.
  • First released: Feb 10, 2025.
  • Monthly downloads: 228.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require airsane/laravel_model_generator
Latest Version:v1.0.2
PHP:^7.3|^8.0
Laravel:5 – 11
License:MIT
Last Updated:Feb 15, 2026
Links: GitHub  ·  Packagist
Maintainer: Airsane

Reliese Laravel Model Generator

Latest Stable Version Total Downloads Latest Unstable Version License

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?

This package expects that you are using Laravel 5.1 or above. You will need to import the airsane/laravel_model_generator package via composer:

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 airsane/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

Generating models with artisan

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

To change the scaffolding behaviour you can make config/models.php configuration file fit your database needs. Check it out ;-)

Tips

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

For the time being, this package supports MySQL, PostgreSQL,SQLite and SQL Server databases. Support for other databases are encouraged to be added through pull requests.

Original Author

This package is a fork of reliese/laravel with some modifications to support SQL Server.

Contributors

Related Packages

reliese/laravel

Reliese Components for Laravel Framework code generation.

4,405,976 1,703
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607

Version History

Version Released PHP Laravel License
v1.0.2 ^7.3|^8.0 >=5.1 MIT
v1.0.1 ^7.3|^8.0 >=5.1 MIT