diff --git a/app/Console/Commands/SubdomainFill.php b/app/Console/Commands/SubdomainFill.php new file mode 100644 index 000000000000..ad5471d7866c --- /dev/null +++ b/app/Console/Commands/SubdomainFill.php @@ -0,0 +1,64 @@ +whereNull('subdomain')->orWhere('subdomain', '')->get(); + $c2 = Company::on('db-ninja-02')->whereNull('subdomain')->orWhere('subdomain', '')->get(); + + + $c1->each(function ($company){ + + $company->subdomain = MultiDB::randomSubdomainGenerator(); + $company->save(); + + }); + + $c2->each(function ($company){ + + $company->subdomain = MultiDB::randomSubdomainGenerator(); + $company->save(); + + }); + + } + +}