blackbricksoftware/laravel-migration-builder

Programatically create full laravel migrations.


License
MIT

Documentation

Laravel Migration Builder

Description

Programmatically define a table and column definitions and write a migration file. Useful for instance where you would like to create migration from an external source such as an api to store the data locally. See here for an example usage.

Installation

Install package

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

Publish configuration

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

Usage

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

Run php artisan make:migration-builder:example to create an 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 programatically creating migrations.
  • Vitaliy Dotsenko for this write up that fixed my autoloading.