Browse Source

init saas

peterguo 2 months ago
parent
commit
ed4bd01851

+ 8 - 0
database/migrations/2019_09_15_000010_create_tenants_table.php

@@ -8,6 +8,14 @@ use Illuminate\Support\Facades\Schema;
 
 class CreateTenantsTable extends Migration
 {
+    /**
+     * Get the migration connection name.
+     */
+    public function getConnection(): ?string
+    {
+        return config('tenancy.database.central_connection');
+    }
+
     /**
      * Run the migrations.
      *

+ 7 - 0
database/migrations/2019_09_15_000020_create_domains_table.php

@@ -8,6 +8,13 @@ use Illuminate\Support\Facades\Schema;
 
 class CreateDomainsTable extends Migration
 {
+    /**
+     * Get the migration connection name.
+     */
+    public function getConnection(): ?string
+    {
+        return config('tenancy.database.central_connection');
+    }
     /**
      * Run the migrations.
      *