joshbrw/laravel-module-migrations

Adds functionality for running migrations from other modules.
3,673
Install
composer require joshbrw/laravel-module-migrations
Latest Version:v2.0.0
PHP:>=7.2
Laravel:5
License:MIT
Last Updated:Mar 28, 2019
Links: GitHub  ·  Packagist
Maintainer: joshbrw

Laravel Module Migrations

Provides a Trait that can be used on migrations with Laravel Modules to ensure that a table from another Module exists. This solves any cross-module table dependency issues.

Installation

  1. Publish the config to config/module-migrations.php by running:

    php artisan vendor:publish --provider="Joshbrw\LaravelModuleMigrations\LaravelModuleMigrationsServiceProvider"

  2. Write your table definitions within this config file. This config file should define the tables that can be created, the module that their migrations exist in and any migrations that should be ran to create this table.

  3. In any migrations that require tables created in other modules, use Joshbrw\LaravelModuleMigrations\Traits\ModuleMigrator.

  4. Use $this->ensureTableExists('tableName'); wherever you want the tables to be created.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released PHP Laravel License
v2.0.0 >=7.2 5.8.* MIT
v1.2 >=5.6 5.5.*|5.6.* MIT
v1.1 >=5.6 5.5.* MIT
v1.0 >=5.6 5.5.* MIT
v0.1.2 >=5.6 ^5.4 MIT