Skip to content

Programmatically define a table and column definitions and write a migration file.

Notifications You must be signed in to change notification settings

blackbricksoftware/laravel-migration-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Migration Builder

Description

Programmatically define table and column definitions, and write a migration file. This is useful when you want to create migrations from an external source, such as an API, to store data locally. See here for an example usage.

Installation

To install the Laravel Migration Builder package, follow these steps:

Install package

composer require blackbricksoftware/laravel-migration-builder --dev

Publish configuration

php artisan vendor:publish --tag=laravel-migration-builder-config

Usage

To create a migration using the example command, follow these steps:

See src/Commands/ExampleCommand.php for an example.

Run php artisan make:migration-builder:example to create a migration with this example.

Acknowledgements

  • Andrew Hanks for this article on how to make a Reddit package.
  • Iftekhar Rifat for this repo with a good starting spot for programmatically creating migrations.
  • Vitaliy Dotsenko for this write-up that fixed my autoloading.

About

Programmatically define a table and column definitions and write a migration file.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages