Download the PHP package quintenmbusiness/laravel-project-generation without Composer
On this page you can find all versions of the php package quintenmbusiness/laravel-project-generation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download quintenmbusiness/laravel-project-generation
More information about quintenmbusiness/laravel-project-generation
Files in quintenmbusiness/laravel-project-generation
Package laravel-project-generation
Short Description Generates all the classes you can think of for your laravel application using only migration files
License MIT
Informations about the package 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
This package relies on LaravelAnalyzer to inspect migrations and database structure.
- LaravelAnalyzer (Packagist): https://packagist.org/packages/quintenmbusiness/laravel-analyzer
- LaravelAnalyzer Wiki / Docs: https://github.com/quintenmbusiness/LaravelAnalyzer/wiki
All schema information (tables, columns, relations) is provided by LaravelAnalyzer.
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
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
Run the interactive generator command:
php artisan project:generate
Interactive Flow
- Select a database connection
Onlysqliteandmysqlconnections 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
- Existing files are overwritten after confirmation
- Relationships are inferred using LaravelAnalyzer
This will then generate for you:
Example Generated Model
Example Generated Factory
Example Migration file used
Notes
- Commit or back up your code before running the generator.
- All schema inspection is handled by LaravelAnalyzer.
All versions of laravel-project-generation with dependencies
quintenmbusiness/laravel-analyzer Version 1.3.1
laravel/prompts Version ^0.3.0@dev
friendsofphp/php-cs-fixer Version ^3.0