1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 09:54:03 +00:00

Fix link to #exempt-domains

This commit is contained in:
Samuel Štancl 2019-01-19 16:40:08 +01:00 committed by GitHub
parent 616045b65b
commit 8848808271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,15 +73,17 @@ protected function mapTenantRoutes()
}
```
And add this to `map()`:
And add this code block to `map()`:
```php
// Map tenant routes only if the current domain is not [exempt from tenancy](#exempt-domains).
// Map tenant routes only if the current domain is not exempt from tenancy.
if (! in_array(request()->getHost(), config('tenancy.exempt_domains', []))) {
$this->mapTenantRoutes();
}
```
This maps tenant routes only if the current domain is not [exempt from tenancy](#exempt-domains).
Now rename the `routes/web.php` file to `routes/tenant.php`. This file will contain routes accessible only with tenancy.
Create an empty `routes/web.php` file. This file will contain routes accessible without tenancy (such as the landing page.)