PHPackages                             pepijnolivier/eloquent-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. pepijnolivier/eloquent-model-generator

ActiveLibrary

pepijnolivier/eloquent-model-generator
======================================

Eloquent Model Generator

v3.1.0(4mo ago)92152↓100%14[6 issues](https://github.com/pepijnolivier/Eloquent-Model-Generator/issues)[2 PRs](https://github.com/pepijnolivier/Eloquent-Model-Generator/pulls)MITPHPPHP ^8.4

Since Dec 8Pushed 3mo ago7 watchersCompare

[ Source](https://github.com/pepijnolivier/Eloquent-Model-Generator)[ Packagist](https://packagist.org/packages/pepijnolivier/eloquent-model-generator)[ Docs](https://github.com/pepijnolivier/eloquent-model-generator)[ RSS](/packages/pepijnolivier-eloquent-model-generator/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (4)Versions (12)Used By (0)

Eloquent Model Generator
========================

[](#eloquent-model-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7b961a8a362a827222eeff769671e471e211dfdd268563c5e022a601e392d07c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706570696a6e6f6c69766965722f656c6f7175656e742d6d6f64656c2d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pepijnolivier/eloquent-model-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5932251d79a6af6c8635075224e4a87d22cc947c10c3d1ebb57b4323e5f5ea53/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706570696a6e6f6c69766965722f656c6f7175656e742d6d6f64656c2d67656e657261746f722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/pepijnolivier/eloquent-model-generator/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/4270c8ecc6672a193dc9fe293065f0411a7be58061cf0e25e2ac04c3baf13c24/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706570696a6e6f6c69766965722f656c6f7175656e742d6d6f64656c2d67656e657261746f722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/pepijnolivier/eloquent-model-generator/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/2a506e5bd9d3c6d0dcf70a1be98f5a73f9224cf0640ba2ec32035987a7fce2cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706570696a6e6f6c69766965722f656c6f7175656e742d6d6f64656c2d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pepijnolivier/eloquent-model-generator)

This Laravel package will generate models with their appropriate Eloquent relations based on an existing database schema.

For automatically generating database migrations for your schema, see [kitloong/laravel-migrations-generator](https://github.com/kitloong/laravel-migrations-generator)

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

[](#requirements)

- PHP 8.4+
- Laravel 12+

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

[](#installation)

You can install the package via composer:

```
composer require --dev pepijnolivier/eloquent-model-generator
```

You can publish the config file with:

```
php artisan vendor:publish --tag="eloquent-model-generator-config"
```

This is the contents of the published config file:

```
