Download the PHP package cedric-lekene/laravel-migration-ai without Composer
On this page you can find all versions of the php package cedric-lekene/laravel-migration-ai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cedric-lekene/laravel-migration-ai
More information about cedric-lekene/laravel-migration-ai
Files in cedric-lekene/laravel-migration-ai
Package laravel-migration-ai
Short Description A Laravel package that uses AI to generate database migrations from plain-language descriptions, simplifying the migration creation process
License MIT
Informations about the package laravel-migration-ai
🤖 Laravel Migration AI
A Laravel package that uses AI to generate database migrations from plain-language descriptions, simplifying the migration creation process.
Table of Contents
- Installation
- Configuration
- Usage
- Commands
- Example
- License
- Contributing
Installation
-
Install the package via Composer:
Run the following command in your Laravel project:
-
Register the Service Provider (if not using auto-discovery):
If your Laravel version does not support package auto-discovery, you will need to register the service provider in your
config/app.php
file:
Configuration
To use the package, you need to set up your environment variables. Add the following keys to your .env
file:
Environment Variables
- GEMINI_API_KEY: Your API key for Gemini.
- GEMINI_MODEL: (Optional) Specify the model used for Gemini (default:
gemini-1.5-flash
).
Note:
GEMINI_API_KEY
must be defined in your environment variables.
Usage
Once the package is installed and configured, you can generate a migration file using the command below.
Commands
- make:migration-ai: Generate a migration file from a plain-language description.
Example Command
Example
Real Output
This command will create a migration file similar to the following:
This command will create a migration file based on the provided description.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please read the CONTRIBUTING.md for details on how to contribute to this project.