mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
Update testing.blade.md
How to force (sub)domain identification while testing
This commit is contained in:
parent
6184708cf0
commit
98365debde
1 changed files with 3 additions and 0 deletions
|
|
@ -57,6 +57,9 @@ class TestCase // extends ...
|
||||||
$tenant = Tenant::create();
|
$tenant = Tenant::create();
|
||||||
|
|
||||||
tenancy()->initialize($tenant);
|
tenancy()->initialize($tenant);
|
||||||
|
|
||||||
|
// Depending on the tenant identification middleware you may want to force the URL. For example:
|
||||||
|
URL::forceRootUrl( 'https://'.$this->tenant->domains[ 0 ]->domain.'.'.centralDomains()[ 0 ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue