PHPackages                             quintenmbusiness/laravel-project-generation - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. quintenmbusiness/laravel-project-generation

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

quintenmbusiness/laravel-project-generation
===========================================

Generates all the classes you can think of for your laravel application using only migration files

0.2(5mo ago)148MITPHPPHP ^8.1

Since Jan 29Pushed 5mo agoCompare

[ Source](https://github.com/quintenmbusiness/laravel-project-generation)[ Packagist](https://packagist.org/packages/quintenmbusiness/laravel-project-generation)[ RSS](/packages/quintenmbusiness-laravel-project-generation/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (3)Versions (8)Used By (0)

laravel-project-generation
==========================

[](#laravel-project-generation)

Generate Laravel Eloquent models from your database schema using LaravelAnalyzer.

This package currently generates **only Eloquent models + Factories**.

---

Dependencies
------------

[](#dependencies)

This package relies on **LaravelAnalyzer** to inspect migrations and database structure.

- LaravelAnalyzer (Packagist):
- LaravelAnalyzer Wiki / Docs:

All schema information (tables, columns, relations) is provided by LaravelAnalyzer.

---

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

[](#installation)

Install the package via Composer:

```
composer require quintenmbusiness/laravel-project-generation

```

This package requires PHP 8.1+ and will automatically install:

- quintenmbusiness/laravel-analyzer (v1.3.1)
- laravel/prompts

---

Service Provider
----------------

[](#service-provider)

If Laravel package auto-discovery is disabled, manually register the service provider.

Add the following to `config/app.php`:

```
'providers' => [
    quintenmbusiness\LaravelProjectGeneration\LaravelProjectGenerationServiceProvider::class,
],

```

---

Usage
-----

[](#usage)

Run the interactive generator command:

```
php artisan project:generate

```

---

Interactive Flow
----------------

[](#interactive-flow)

- Select a database connection
    Only `sqlite` and `mysql` connections are shown.
- Select preview detail level
    - A: Tables, columns, relationships
    - B: Tables and columns
    - C: Tables only
    - D: Nothing
- Select class types to generate
    - Currently supported: Model, Factory
- Optional file tree preview
- Multiple safety confirmations before overwriting files

---

Output
------

[](#output)

- Existing files are overwritten after confirmation
- Relationships are inferred using LaravelAnalyzer

---

This will then generate for you:

Example Generated Model
-----------------------

[](#example-generated-model)

```
