Package Data | |
---|---|
Maintainer Username: | joshbrw |
Maintainer Contact: | josh@joshbrown.me (Josh Brown) |
Package Create Date: | 2017-03-15 |
Package Last Update: | 2019-03-28 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-24 03:00:42 |
Package Statistics | |
---|---|
Total Downloads: | 3,664 |
Monthly Downloads: | 4 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
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.
Publish the config to config/module-migrations.php
by running:
php artisan vendor:publish --provider="Joshbrw\LaravelModuleMigrations\LaravelModuleMigrationsServiceProvider"
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.
In any migrations that require tables created in other modules, use Joshbrw\LaravelModuleMigrations\Traits\ModuleMigrator
.
Use $this->ensureTableExists('tableName');
wherever you want the tables to be created.