Assign the existing site to one landlord so stommer.info can run tenancy.
Seebad 0.3 stays in this release. With a single landlord every host still reaches the default website. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d9e52c4789
commit
8ebc1a3878
93 files changed
+2506
-112
No files matched your search
@@ -5,6 +5,8 @@
|
||||
use App\Models\Page;
|
||||
use App\Models\Property;
|
||||
use App\Models\Site;
|
||||
use App\Models\Tenant;
|
||||
use App\Tenancy\TenantContext;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
@@ -19,7 +21,11 @@ class SiteSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$tenantId = Property::withoutGlobalScope('tenant')->value('tenant_id') ?? Tenant::stommer()->id;
|
||||
app(TenantContext::class)->set(Tenant::query()->findOrFail($tenantId));
|
||||
|
||||
$site = Site::create([
|
||||
'tenant_id' => $tenantId,
|
||||
'name' => 'Ferienwohnung Stommer',
|
||||
'domain' => null,
|
||||
'is_default' => true,
|
||||
|
||||
Reference in new issue
Block a user