承接 envive/tenant-migrate 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

envive/tenant-migrate

Composer 安装命令:

composer require envive/tenant-migrate

包简介

laravel migrate command tool for multi-tenant pattern

README 文档

README

Add multi-tenant support for Laravel migrate command

Installation

composer require envive/tenant-migrate

Automatic service registration

Using auto discovery, the tenancy package will be auto detected by Laravel automatically.

Manual service registration

In case you want to disable webserver integration or prefer manual integration, set the dont-discover in your application composer.json, like so:

{
    "extra": {
        "laravel": {
            "dont-discover": "envive/tenant-migrate"
        }
    }
}

If you disable auto discovery you are able to configure the providers by yourself.

Register the service provider in your config/app.php:

    'providers' => [
        // [..]
        // Tenant migrate.
         Envive\TenantMigrate\TenantMigrateServiceProvider::class,
    ],

Deploy configuration

Publish the configuration file so you can modify it to your needs:

 php artisan vendor:publish --provider=Envive\\TenantMigrate\\TenantMigrateServiceProvider

Open the config/tenant.php file and modify to your needs. Put your tenant database connection information into the connection and add tenant_prefix if needed.

This package will add seven commands below into your artisan list. You can get more information with option help.

  tenant:migrate           Run the database migrations with multi-tenant support
  tenant:migrate:fresh     Drop all tables and re-run all migrations with multi-tenant support
  tenant:migrate:install   Create the migration repository with multi-tenant support
  tenant:migrate:refresh   Reset and re-run all migrations with multi-tenant support
  tenant:migrate:reset     Rollback all database migrations with multi-tenant support
  tenant:migrate:rollback  Rollback the last database migration with multi-tenant support
  tenant:migrate:status    Show the status of each migration with multi-tenant support

统计信息

  • 总下载量: 58
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-29