blackbricksoftware/laravel-migration-builder

Programmatically create full Laravel migrations.

v0.3.0 2022-04-25 07:58 UTC

This package is auto-updated.

Last update: 2024-05-04 09:35:45 UTC


README

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.