joshbrw/laravel-module-migrations
Composer 安装命令:
composer require joshbrw/laravel-module-migrations
包简介
Adds functionality for running migrations from other modules.
README 文档
README
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
-
Publish the config to
config/module-migrations.phpby 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.
统计信息
- 总下载量: 3.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-15